New guile function.

1998-12-08  Martin Baulig  <martin@home-of-linux.org>

	* guile.awk (glibtop-get-sysdeps): New guile function.
This commit is contained in:
Martin Baulig
1998-12-08 21:08:23 +00:00
committed by Martin Baulig
parent f720f21e07
commit 6ccd22ae04
2 changed files with 15 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
1998-12-08 Martin Baulig <martin@home-of-linux.org> 1998-12-08 Martin Baulig <martin@home-of-linux.org>
* guile.awk (glibtop-get-sysdeps): New guile function.
* guile.awk (glibtop_get_proc_map): Make a gh_list for each map * guile.awk (glibtop_get_proc_map): Make a gh_list for each map
entry and append all of them to the returned list. entry and append all of them to the returned list.
(glibtop_get_mountlist): Likewise. (glibtop_get_mountlist): Likewise.

View File

@@ -22,6 +22,8 @@ BEGIN {
backconv["pid_t"] = "gh_scm2ulong"; backconv["pid_t"] = "gh_scm2ulong";
backconv["long"] = "gh_scm2long"; backconv["long"] = "gh_scm2long";
backconv["ulong"] = "gh_scm2ulong"; backconv["ulong"] = "gh_scm2ulong";
feature_count = 0;
} }
function make_output(line) { function make_output(line) {
@@ -34,6 +36,9 @@ function make_output(line) {
sub(/^@/,"",feature); sub(/^@/,"",feature);
features[feature] = feature; features[feature] = feature;
feature_field[feature_count] = feature;
feature_count = feature_count+1;
total_nr_params = 0; total_nr_params = 0;
if (param_def == "string") { if (param_def == "string") {
@@ -173,6 +178,14 @@ function make_output(line) {
/^[^#]/ { make_output($0) } /^[^#]/ { make_output($0) }
END { END {
sep=""
sysdeps="void|sysdeps|ulong(";
for(nr = 0; nr < feature_count; nr++) {
sysdeps = sysdeps""sep""feature_field[nr];
sep=",";
}
sysdeps=sysdeps")";
make_output(sysdeps);
print "void"; print "void";
print "glibtop_boot_guile (void)"; print "glibtop_boot_guile (void)";
print "{"; print "{";