Make a gh_list for each map entry and append all of them to the returned
1998-12-08 Martin Baulig <martin@home-of-linux.org> * guile.awk (glibtop_get_proc_map): Make a gh_list for each map entry and append all of them to the returned list. (glibtop_get_mountlist): Likewise.
This commit is contained in:
committed by
Martin Baulig
parent
da51ae35c0
commit
f720f21e07
@@ -2,6 +2,7 @@
|
||||
|
||||
* guile.awk (glibtop_get_proc_map): Make a gh_list for each map
|
||||
entry and append all of them to the returned list.
|
||||
(glibtop_get_mountlist): Likewise.
|
||||
|
||||
1998-10-20 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
|
@@ -74,7 +74,7 @@ function make_output(line) {
|
||||
output = output"\tglibtop_"feature" "feature";\n";
|
||||
if (retval != "void")
|
||||
output = output"\t"retval" retval;\n";
|
||||
if (feature ~ /^proc(list|_map)$/)
|
||||
if (feature ~ /^(proc(list|_map))|mountlist$/)
|
||||
output = output"\tunsigned i;\n";
|
||||
output = output"\tSCM list;\n\n";
|
||||
|
||||
@@ -147,6 +147,24 @@ function make_output(line) {
|
||||
print "\tglibtop_free (retval);\n";
|
||||
};
|
||||
|
||||
if (feature ~ /^mountlist$/) {
|
||||
print "\tif (retval == NULL)";
|
||||
print "\t\treturn list;";
|
||||
print "";
|
||||
print "\tfor (i = 0; i < mountlist.number; i++) {";
|
||||
print "\t\tglibtop_mountentry *entry = &(retval [i]);";
|
||||
print "\t\tSCM scm_entry = gh_list";
|
||||
print "\t\t\t(gh_ulong2scm ((unsigned long) entry->dev),";
|
||||
print "\t\t\t gh_str02scm (entry->devname),";
|
||||
print "\t\t\t gh_str02scm (entry->mountdir),";
|
||||
print "\t\t\t gh_str02scm (entry->type), SCM_UNDEFINED);";
|
||||
print "\t\tSCM entry_list = gh_list (scm_entry, SCM_UNDEFINED);\n";
|
||||
|
||||
print "\t\tlist = scm_append (gh_list (list, entry_list, SCM_UNDEFINED));";
|
||||
print "\t};\n";
|
||||
print "\tglibtop_free (retval);\n";
|
||||
};
|
||||
|
||||
print "\treturn list;";
|
||||
print "}";
|
||||
print "";
|
||||
|
Reference in New Issue
Block a user