New file. Creates gulie.c' depending upon
features.def'.
1998-06-14 Martin Baulig <martin@home-of-linux.org> * sysdeps/guile/guile.awk: New file. Creates `gulie.c' depending upon `features.def'. * sysdeps/guile/*.c: Removed.
This commit is contained in:
committed by
Martin Baulig
parent
6fd3c113ec
commit
13148c632f
@@ -1,3 +1,10 @@
|
||||
1998-06-14 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* sysdeps/guile/guile.awk: New file.
|
||||
Creates `gulie.c' depending upon `features.def'.
|
||||
|
||||
* sysdeps/guile/*.c: Removed.
|
||||
|
||||
1998-06-13 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* features.def: List of features for `guile-names.awk'.
|
||||
|
33
features.def
33
features.def
@@ -1,17 +1,16 @@
|
||||
cpu
|
||||
mem
|
||||
swap
|
||||
uptime
|
||||
loadavg
|
||||
shm_limits
|
||||
msg_limits
|
||||
sem_limits
|
||||
proclist
|
||||
proc_state
|
||||
proc_uid
|
||||
proc_mem
|
||||
proc_time
|
||||
proc_signal
|
||||
proc_kernel
|
||||
proc_segment
|
||||
sysdeps
|
||||
cpu ulong(total,user,nice,sys,idle,frequency)
|
||||
mem ulong(total,used,free,shared,buffer,cached,user,locked)
|
||||
swap ulong(total,used,free)
|
||||
uptime double(uptime,idletime)
|
||||
loadavg double(loadavg[0],loadavg[1],loadavg[2])
|
||||
shm_limits ulong(shmmax,shmmin,shmmni,shmseg,shmall)
|
||||
msg_limits ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql)
|
||||
sem_limits ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem)
|
||||
proclist ulong(number,size,total)
|
||||
proc_state str(cmd):char(state):ulong(uid,gid)
|
||||
proc_uid long(uid,euid,gid,egid,pid,ppid,pgrp,session,tty,tpgid,priority,nice)
|
||||
proc_mem long(size,vsize,resident,share,rss,rss_rlim)
|
||||
proc_time long(start_time,utime,stime,cutime,cstime,timeout,it_real_value)
|
||||
proc_signal long(signal,blocked,sigignore,sigcatch)
|
||||
proc_kernel ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,wchan)
|
||||
proc_segment long(trs,lrs,drs,dt):ulong(start_code,end_code,start_stack)
|
||||
|
@@ -19,3 +19,15 @@ libgtop_guile_la_SOURCES = boot.c sysdeps.c cpu.c mem.c swap.c uptime.c \
|
||||
sem_limits.c proclist.c procstate.c procuid.c \
|
||||
proctime.c procmem.c procsignal.c prockernel.c \
|
||||
procsegment.c
|
||||
|
||||
libgtop_guile_la_SOURCES = guile.c
|
||||
|
||||
BUILT_SOURCES = guile.c
|
||||
|
||||
guile.c: guile.awk $(top_builddir)/config.h $(top_builddir)/features.def
|
||||
$(AWK) -f $(srcdir)/guile.awk < $(top_builddir)/features.def > gnc-t
|
||||
mv gnc-t guile.c
|
||||
|
||||
EXTRA_DIST = guile.awk
|
||||
|
||||
CLEANFILES = guile.c
|
||||
|
@@ -1,66 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/sysdeps.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
void
|
||||
glibtop_boot_guile (void)
|
||||
{
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-cpu", glibtop_guile_get_cpu);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-mem", glibtop_guile_get_mem);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-swap", glibtop_guile_get_swap);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-uptime", glibtop_guile_get_uptime);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-loadavg", glibtop_guile_get_loadavg);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-shm_limits",glibtop_guile_get_shm_limits);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-msg_limits", glibtop_guile_get_msg_limits);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-sem_limits", glibtop_guile_get_sem_limits);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-sysdeps", glibtop_guile_get_sysdeps);
|
||||
gh_new_procedure0_0
|
||||
("glibtop-get-proclist", glibtop_guile_get_proclist);
|
||||
|
||||
gh_new_procedure1_0
|
||||
("glibtop-get-proc_state", glibtop_guile_get_proc_state);
|
||||
gh_new_procedure1_0
|
||||
("glibtop-get-proc_uid", glibtop_guile_get_proc_uid);
|
||||
gh_new_procedure1_0
|
||||
("glibtop-get-proc_mem", glibtop_guile_get_proc_mem);
|
||||
gh_new_procedure1_0
|
||||
("glibtop-get-proc_time", glibtop_guile_get_proc_time);
|
||||
gh_new_procedure1_0
|
||||
("glibtop-get-proc_signal", glibtop_guile_get_proc_signal);
|
||||
gh_new_procedure1_0
|
||||
("glibtop-get-proc_kernel", glibtop_guile_get_proc_kernel);
|
||||
gh_new_procedure1_0
|
||||
("glibtop-get-proc_segment", glibtop_guile_get_proc_segment);
|
||||
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/cpu.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_cpu (void)
|
||||
{
|
||||
glibtop_cpu cpu;
|
||||
|
||||
glibtop_get_cpu (&cpu);
|
||||
|
||||
return gh_list (gh_ulong2scm (cpu.flags),
|
||||
gh_ulong2scm (cpu.total),
|
||||
gh_ulong2scm (cpu.user),
|
||||
gh_ulong2scm (cpu.nice),
|
||||
gh_ulong2scm (cpu.sys),
|
||||
gh_ulong2scm (cpu.idle),
|
||||
gh_ulong2scm (cpu.frequency),
|
||||
SCM_UNDEFINED);
|
||||
}
|
87
sysdeps/guile/guile.awk
Normal file
87
sysdeps/guile/guile.awk
Normal file
@@ -0,0 +1,87 @@
|
||||
BEGIN {
|
||||
print "/* guile.c */";
|
||||
print "/* This is a generated file. Please modify `guile.awk' */";
|
||||
print "";
|
||||
|
||||
print "#include <glibtop.h>";
|
||||
print "#include <glibtop/xmalloc.h>";
|
||||
print "#include <glibtop/sysdeps.h>";
|
||||
print "";
|
||||
print "#include <guile/gh.h>";
|
||||
|
||||
print "";
|
||||
|
||||
convert["long"] = "gh_long2scm ";
|
||||
convert["ulong"] = "gh_ulong2scm ";
|
||||
convert["double"] = "gh_double2scm";
|
||||
convert["str"] = "gh_str02scm ";
|
||||
convert["char"] = "gh_char2scm ";
|
||||
}
|
||||
|
||||
/^(\w+)/ {
|
||||
features[$1] = $1;
|
||||
if ($1 ~ /^proclist$/) {
|
||||
output = "SCM\nglibtop_guile_get_proclist (void)\n{\n";
|
||||
output = output"\tglibtop_proclist proclist;\n\tunsigned i, *ptr;\n";
|
||||
output = output"\tSCM list;\n\n\tptr = glibtop_get_proclist (&proclist);\n\n";
|
||||
output = output"\tlist = gh_list (gh_ulong2scm ("$1".flags),\n\t\t\t";
|
||||
} else {
|
||||
if ($1 ~ /^proc_/) {
|
||||
output = "SCM\nglibtop_guile_get_"$1" (SCM pid)\n{\n";
|
||||
output = output"\tglibtop_"$1" "$1";\n\n";
|
||||
output = output"\tglibtop_get_"$1" (&"$1", (pid_t) gh_scm2long (pid));\n\n";
|
||||
} else {
|
||||
output = "SCM\nglibtop_guile_get_"$1" (void)\n{\n";
|
||||
output = output"\tglibtop_"$1" "$1";\n\n";
|
||||
output = output"\tglibtop_get_"$1" (&"$1");\n\n";
|
||||
}
|
||||
output = output"\treturn gh_list (gh_ulong2scm ("$1".flags),\n\t\t\t";
|
||||
}
|
||||
nr_elements = split ($2, elements, /:/);
|
||||
for (element = 1; element <= nr_elements; element++) {
|
||||
list = elements[element];
|
||||
type = elements[element];
|
||||
sub(/\(.*/, "", type);
|
||||
sub(/^\w+\(/, "", list); sub(/\)$/, "", list);
|
||||
count = split (list, fields, /,/);
|
||||
for (field = 1; field <= count; field++) {
|
||||
output = output""convert[type]" ("$1"."fields[field]"),\n\t\t\t";
|
||||
}
|
||||
}
|
||||
output = output"SCM_UNDEFINED);";
|
||||
print output;
|
||||
|
||||
if ($1 ~ /^proclist$/) {
|
||||
print "";
|
||||
print "\tif (ptr) {";
|
||||
print "\t\tfor (i = 0; i < proclist.number; i++)";
|
||||
print "\t\t\tlist = gh_append";
|
||||
print "\t\t\t\t(gh_list (list,";
|
||||
print "\t\t\t\t\t gh_list (gh_ulong2scm ((unsigned long) ptr [i])),";
|
||||
print "\t\t\t\t\t SCM_UNDEFINED));";
|
||||
print "\t}";
|
||||
print "";
|
||||
print "\tglibtop_free (ptr);";
|
||||
print "";
|
||||
print "\treturn list;";
|
||||
}
|
||||
print "}";
|
||||
print "";
|
||||
}
|
||||
|
||||
END {
|
||||
print "void";
|
||||
print "glibtop_boot_guile (void)";
|
||||
print "{";
|
||||
|
||||
for (feature in features) {
|
||||
if (feature ~ /^proc_/) {
|
||||
print "\tgh_new_procedure1_0";
|
||||
} else {
|
||||
print "\tgh_new_procedure0_0";
|
||||
}
|
||||
print "\t\t(\"glibtop-get-"feature"\", glibtop_guile_get_"feature");";
|
||||
}
|
||||
print "}";
|
||||
}
|
||||
|
@@ -1,38 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/loadavg.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_loadavg (void)
|
||||
{
|
||||
glibtop_loadavg loadavg;
|
||||
|
||||
glibtop_get_loadavg (&loadavg);
|
||||
|
||||
return gh_list (gh_ulong2scm (loadavg.flags),
|
||||
gh_double2scm (loadavg.loadavg [0]),
|
||||
gh_double2scm (loadavg.loadavg [1]),
|
||||
gh_double2scm (loadavg.loadavg [2]),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/mem.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_mem (void)
|
||||
{
|
||||
glibtop_mem mem;
|
||||
|
||||
glibtop_get_mem (&mem);
|
||||
|
||||
return gh_list (gh_ulong2scm (mem.flags),
|
||||
gh_ulong2scm (mem.total),
|
||||
gh_ulong2scm (mem.used),
|
||||
gh_ulong2scm (mem.free),
|
||||
gh_ulong2scm (mem.shared),
|
||||
gh_ulong2scm (mem.buffer),
|
||||
gh_ulong2scm (mem.cached),
|
||||
gh_ulong2scm (mem.user),
|
||||
gh_ulong2scm (mem.locked),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/msg_limits.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_msg_limits (void)
|
||||
{
|
||||
glibtop_msg_limits msg_limits;
|
||||
|
||||
glibtop_get_msg_limits (&msg_limits);
|
||||
|
||||
return gh_list (gh_ulong2scm (msg_limits.flags),
|
||||
gh_ulong2scm (msg_limits.msgpool),
|
||||
gh_ulong2scm (msg_limits.msgmap),
|
||||
gh_ulong2scm (msg_limits.msgmax),
|
||||
gh_ulong2scm (msg_limits.msgmnb),
|
||||
gh_ulong2scm (msg_limits.msgmni),
|
||||
gh_ulong2scm (msg_limits.msgssz),
|
||||
gh_ulong2scm (msg_limits.msgtql),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -18,3 +18,5 @@ guile-names.c: guile-names.awk $(top_builddir)/config.h $(top_builddir)/features
|
||||
|
||||
EXTRA_DIST = guile-names.awk
|
||||
|
||||
CLEANFILES = guile-names.c
|
||||
|
||||
|
@@ -12,19 +12,19 @@ BEGIN {
|
||||
|
||||
}
|
||||
|
||||
output ($feature) {
|
||||
function output(feature) {
|
||||
print "SCM";
|
||||
print "glibtop_guile_names_"$feature" (void)";
|
||||
print "glibtop_guile_names_"feature" (void)";
|
||||
print "{";
|
||||
print "\tint i;";
|
||||
print "\tSCM list;";
|
||||
print "";
|
||||
print "\tlist = gh_list (SCM_UNDEFINED);";
|
||||
print "";
|
||||
print "\tfor (i = 0; i < GLIBTOP_MAX_"toupper($feature)"; i++)";
|
||||
print "\tfor (i = 0; i < GLIBTOP_MAX_"toupper(feature)"; i++)";
|
||||
print "\t\tlist = gh_append";
|
||||
print "\t\t\t(gh_list (list,";
|
||||
print "\t\t\t\t gh_list (gh_str02scm ((char *) glibtop_names_"$feature" [i])),";
|
||||
print "\t\t\t\t gh_list (gh_str02scm ((char *) glibtop_names_"feature" [i])),";
|
||||
print "\t\t\t\t SCM_UNDEFINED));";
|
||||
print "";
|
||||
print "\treturn list;";
|
||||
@@ -33,17 +33,17 @@ output ($feature) {
|
||||
print "";
|
||||
|
||||
print "SCM";
|
||||
print "glibtop_guile_types_"$feature" (void)";
|
||||
print "glibtop_guile_types_"feature" (void)";
|
||||
print "{";
|
||||
print "\tint i;";
|
||||
print "\tSCM list;";
|
||||
print "";
|
||||
print "\tlist = gh_list (SCM_UNDEFINED);";
|
||||
print "";
|
||||
print "\tfor (i = 0; i < GLIBTOP_MAX_"toupper($feature)"; i++)";
|
||||
print "\tfor (i = 0; i < GLIBTOP_MAX_"toupper(feature)"; i++)";
|
||||
print "\t\tlist = gh_append";
|
||||
print "\t\t\t(gh_list (list,";
|
||||
print "\t\t\t\t gh_list (gh_ulong2scm (glibtop_types_"$feature" [i])),";
|
||||
print "\t\t\t\t gh_list (gh_ulong2scm (glibtop_types_"feature" [i])),";
|
||||
print "\t\t\t\t SCM_UNDEFINED));";
|
||||
print "";
|
||||
print "\treturn list;";
|
||||
@@ -52,18 +52,18 @@ output ($feature) {
|
||||
print "";
|
||||
|
||||
print "SCM";
|
||||
print "glibtop_guile_labels_"$feature" (void)";
|
||||
print "glibtop_guile_labels_"feature" (void)";
|
||||
print "{";
|
||||
print "\tint i;";
|
||||
print "\tSCM list;";
|
||||
print "";
|
||||
print "\tlist = gh_list (SCM_UNDEFINED);";
|
||||
print "";
|
||||
print "\tfor (i = 0; i < GLIBTOP_MAX_"toupper($feature)"; i++)";
|
||||
print "\tfor (i = 0; i < GLIBTOP_MAX_"toupper(feature)"; i++)";
|
||||
print "\t\tlist = gh_append";
|
||||
print "\t\t\t(gh_list (list,";
|
||||
print "\t\t\t\t gh_list (gh_str02scm (gettext";
|
||||
print "\t\t\t\t\t\t\t(glibtop_labels_"$feature" [i]))),";
|
||||
print "\t\t\t\t\t\t\t(glibtop_labels_"feature" [i]))),";
|
||||
print "\t\t\t\t SCM_UNDEFINED));";
|
||||
print "";
|
||||
print "\treturn list;";
|
||||
@@ -72,18 +72,18 @@ output ($feature) {
|
||||
print "";
|
||||
|
||||
print "SCM";
|
||||
print "glibtop_guile_descriptions_"$feature" (void)";
|
||||
print "glibtop_guile_descriptions_"feature" (void)";
|
||||
print "{";
|
||||
print "\tint i;";
|
||||
print "\tSCM list;";
|
||||
print "";
|
||||
print "\tlist = gh_list (SCM_UNDEFINED);";
|
||||
print "";
|
||||
print "\tfor (i = 0; i < GLIBTOP_MAX_"toupper($feature)"; i++)";
|
||||
print "\tfor (i = 0; i < GLIBTOP_MAX_"toupper(feature)"; i++)";
|
||||
print "\t\tlist = gh_append";
|
||||
print "\t\t\t(gh_list (list,";
|
||||
print "\t\t\t\t gh_list (gh_str02scm (gettext";
|
||||
print "\t\t\t\t\t\t\t(glibtop_descriptions_"$feature" [i]))),";
|
||||
print "\t\t\t\t\t\t\t(glibtop_descriptions_"feature" [i]))),";
|
||||
print "\t\t\t\t SCM_UNDEFINED));";
|
||||
print "";
|
||||
print "\treturn list;";
|
||||
@@ -96,7 +96,7 @@ output ($feature) {
|
||||
|
||||
END {
|
||||
for (feature in features) {
|
||||
output (feature);
|
||||
output(feature);
|
||||
}
|
||||
|
||||
print "void";
|
||||
|
@@ -1,44 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/prockernel.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM
|
||||
glibtop_guile_get_proc_kernel (SCM pid)
|
||||
{
|
||||
glibtop_proc_kernel p;
|
||||
|
||||
glibtop_get_proc_kernel (&p, (pid_t) gh_scm2long (pid));
|
||||
|
||||
return gh_list (gh_ulong2scm (p.flags),
|
||||
gh_ulong2scm (p.k_flags),
|
||||
gh_ulong2scm (p.min_flt),
|
||||
gh_ulong2scm (p.maj_flt),
|
||||
gh_ulong2scm (p.cmin_flt),
|
||||
gh_ulong2scm (p.cmaj_flt),
|
||||
gh_ulong2scm (p.kstk_esp),
|
||||
gh_ulong2scm (p.kstk_eip),
|
||||
gh_ulong2scm (p.wchan),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/xmalloc.h>
|
||||
#include <glibtop/proclist.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM
|
||||
glibtop_guile_get_proclist (void)
|
||||
{
|
||||
glibtop_proclist proclist;
|
||||
unsigned *ptr;
|
||||
unsigned i;
|
||||
SCM list;
|
||||
|
||||
ptr = glibtop_get_proclist (&proclist);
|
||||
|
||||
list = gh_list (gh_ulong2scm (proclist.flags),
|
||||
gh_ulong2scm (proclist.number),
|
||||
gh_ulong2scm (proclist.size),
|
||||
gh_ulong2scm (proclist.total),
|
||||
SCM_UNDEFINED);
|
||||
|
||||
if (ptr) {
|
||||
for (i = 0; i < proclist.number; i++)
|
||||
list = gh_append
|
||||
(gh_list (list,
|
||||
gh_list (gh_ulong2scm ((unsigned long) ptr [i])),
|
||||
SCM_UNDEFINED));
|
||||
}
|
||||
|
||||
glibtop_free (ptr);
|
||||
|
||||
return list;
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/procmem.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM
|
||||
glibtop_guile_get_proc_mem (SCM pid)
|
||||
{
|
||||
glibtop_proc_mem p;
|
||||
|
||||
glibtop_get_proc_mem (&p, (pid_t) gh_scm2long (pid));
|
||||
|
||||
return gh_list (gh_ulong2scm (p.flags),
|
||||
gh_long2scm (p.size),
|
||||
gh_long2scm (p.vsize),
|
||||
gh_long2scm (p.resident),
|
||||
gh_long2scm (p.share),
|
||||
gh_long2scm (p.rss),
|
||||
gh_long2scm (p.rss_rlim),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/procsegment.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM
|
||||
glibtop_guile_get_proc_segment (SCM pid)
|
||||
{
|
||||
glibtop_proc_segment p;
|
||||
|
||||
glibtop_get_proc_segment (&p, (pid_t) gh_scm2long (pid));
|
||||
|
||||
return gh_list (gh_ulong2scm (p.flags),
|
||||
gh_long2scm (p.trs),
|
||||
gh_long2scm (p.lrs),
|
||||
gh_long2scm (p.drs),
|
||||
gh_long2scm (p.dt),
|
||||
gh_ulong2scm (p.start_code),
|
||||
gh_ulong2scm (p.end_code),
|
||||
gh_ulong2scm (p.start_stack),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/procsignal.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM
|
||||
glibtop_guile_get_proc_signal (SCM pid)
|
||||
{
|
||||
glibtop_proc_signal p;
|
||||
|
||||
glibtop_get_proc_signal (&p, (pid_t) gh_scm2long (pid));
|
||||
|
||||
return gh_list (gh_ulong2scm (p.flags),
|
||||
gh_long2scm (p.signal),
|
||||
gh_long2scm (p.blocked),
|
||||
gh_long2scm (p.sigignore),
|
||||
gh_long2scm (p.sigcatch),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/procstate.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM
|
||||
glibtop_guile_get_proc_state (SCM pid)
|
||||
{
|
||||
glibtop_proc_state p;
|
||||
|
||||
glibtop_get_proc_state (&p, (pid_t) gh_scm2long (pid));
|
||||
|
||||
return gh_list (gh_ulong2scm (p.flags),
|
||||
gh_str02scm (p.cmd),
|
||||
gh_char2scm (p.state),
|
||||
gh_ulong2scm (p.uid),
|
||||
gh_ulong2scm (p.gid),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/proctime.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM
|
||||
glibtop_guile_get_proc_time (SCM pid)
|
||||
{
|
||||
glibtop_proc_time p;
|
||||
|
||||
glibtop_get_proc_time (&p, (pid_t) gh_scm2long (pid));
|
||||
|
||||
return gh_list (gh_ulong2scm (p.flags),
|
||||
gh_long2scm (p.start_time),
|
||||
gh_long2scm (p.utime),
|
||||
gh_long2scm (p.stime),
|
||||
gh_long2scm (p.cutime),
|
||||
gh_long2scm (p.cstime),
|
||||
gh_long2scm (p.timeout),
|
||||
gh_long2scm (p.it_real_value),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/procuid.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM
|
||||
glibtop_guile_get_proc_uid (SCM pid)
|
||||
{
|
||||
glibtop_proc_uid p;
|
||||
|
||||
glibtop_get_proc_uid (&p, (pid_t) gh_scm2long (pid));
|
||||
|
||||
return gh_list (gh_ulong2scm (p.flags),
|
||||
gh_long2scm (p.uid),
|
||||
gh_long2scm (p.euid),
|
||||
gh_long2scm (p.gid),
|
||||
gh_long2scm (p.egid),
|
||||
gh_long2scm (p.pid),
|
||||
gh_long2scm (p.ppid),
|
||||
gh_long2scm (p.pgrp),
|
||||
gh_long2scm (p.session),
|
||||
gh_long2scm (p.tty),
|
||||
gh_long2scm (p.tpgid),
|
||||
gh_long2scm (p.priority),
|
||||
gh_long2scm (p.nice),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/sem_limits.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_sem_limits (void)
|
||||
{
|
||||
glibtop_sem_limits sem_limits;
|
||||
|
||||
glibtop_get_sem_limits (&sem_limits);
|
||||
|
||||
return gh_list (gh_ulong2scm (sem_limits.flags),
|
||||
gh_ulong2scm (sem_limits.semmap),
|
||||
gh_ulong2scm (sem_limits.semmni),
|
||||
gh_ulong2scm (sem_limits.semmns),
|
||||
gh_ulong2scm (sem_limits.semmnu),
|
||||
gh_ulong2scm (sem_limits.semmsl),
|
||||
gh_ulong2scm (sem_limits.semopm),
|
||||
gh_ulong2scm (sem_limits.semume),
|
||||
gh_ulong2scm (sem_limits.semusz),
|
||||
gh_ulong2scm (sem_limits.semvmx),
|
||||
gh_ulong2scm (sem_limits.semaem),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/shm_limits.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_shm_limits (void)
|
||||
{
|
||||
glibtop_shm_limits shm_limits;
|
||||
|
||||
glibtop_get_shm_limits (&shm_limits);
|
||||
|
||||
return gh_list (gh_ulong2scm (shm_limits.flags),
|
||||
gh_ulong2scm (shm_limits.shmmax),
|
||||
gh_ulong2scm (shm_limits.shmmin),
|
||||
gh_ulong2scm (shm_limits.shmmni),
|
||||
gh_ulong2scm (shm_limits.shmseg),
|
||||
gh_ulong2scm (shm_limits.shmall),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/swap.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_swap (void)
|
||||
{
|
||||
glibtop_swap swap;
|
||||
|
||||
glibtop_get_swap (&swap);
|
||||
|
||||
return gh_list (gh_ulong2scm (swap.flags),
|
||||
gh_ulong2scm (swap.total),
|
||||
gh_ulong2scm (swap.used),
|
||||
gh_ulong2scm (swap.free),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/sysdeps.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_sysdeps (void)
|
||||
{
|
||||
glibtop_sysdeps sysdeps;
|
||||
|
||||
glibtop_get_sysdeps (&sysdeps);
|
||||
|
||||
return gh_list (gh_ulong2scm (sysdeps.flags),
|
||||
gh_ulong2scm (sysdeps.cpu),
|
||||
gh_ulong2scm (sysdeps.mem),
|
||||
gh_ulong2scm (sysdeps.swap),
|
||||
gh_ulong2scm (sysdeps.uptime),
|
||||
gh_ulong2scm (sysdeps.loadavg),
|
||||
gh_ulong2scm (sysdeps.shm_limits),
|
||||
gh_ulong2scm (sysdeps.msg_limits),
|
||||
gh_ulong2scm (sysdeps.sem_limits),
|
||||
gh_ulong2scm (sysdeps.proclist),
|
||||
gh_ulong2scm (sysdeps.proc_state),
|
||||
gh_ulong2scm (sysdeps.proc_uid),
|
||||
gh_ulong2scm (sysdeps.proc_mem),
|
||||
gh_ulong2scm (sysdeps.proc_time),
|
||||
gh_ulong2scm (sysdeps.proc_signal),
|
||||
gh_ulong2scm (sysdeps.proc_kernel),
|
||||
gh_ulong2scm (sysdeps.proc_segment),
|
||||
SCM_UNDEFINED);
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/uptime.h>
|
||||
|
||||
#include <guile/gh.h>
|
||||
|
||||
SCM glibtop_guile_get_uptime (void)
|
||||
{
|
||||
glibtop_uptime uptime;
|
||||
|
||||
glibtop_get_uptime (&uptime);
|
||||
|
||||
return gh_list (gh_ulong2scm (uptime.flags),
|
||||
gh_double2scm (uptime.uptime),
|
||||
gh_double2scm (uptime.idletime),
|
||||
SCM_UNDEFINED);
|
||||
}
|
Reference in New Issue
Block a user