From 6130f0a4f99ecbf5e8a28f46581c1742641a155f Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 14 Jun 1998 02:13:50 +0000 Subject: [PATCH] New file. Creates `lib.c' depending upon `features.def'. 1998-06-14 Martin Baulig * lib/lib.awk: New file. Creates `lib.c' depending upon `features.def'. * lib/.c: Removed. --- lib/Makefile.am | 16 +++++++++------ lib/cpu.c | 39 ----------------------------------- lib/lib.awk | 52 +++++++++++++++++++++++++++++++++++++++++++++++ lib/loadavg.c | 39 ----------------------------------- lib/mem.c | 38 ---------------------------------- lib/msg_limits.c | 38 ---------------------------------- lib/prockernel.c | 40 ------------------------------------ lib/proclist.c | 38 ---------------------------------- lib/procmem.c | 40 ------------------------------------ lib/procsegment.c | 40 ------------------------------------ lib/procsignal.c | 40 ------------------------------------ lib/procstate.c | 40 ------------------------------------ lib/proctime.c | 40 ------------------------------------ lib/procuid.c | 40 ------------------------------------ lib/sem_limits.c | 38 ---------------------------------- lib/shm_limits.c | 38 ---------------------------------- lib/swap.c | 38 ---------------------------------- lib/uptime.c | 39 ----------------------------------- 18 files changed, 62 insertions(+), 631 deletions(-) delete mode 100644 lib/cpu.c create mode 100644 lib/lib.awk delete mode 100644 lib/loadavg.c delete mode 100644 lib/mem.c delete mode 100644 lib/msg_limits.c delete mode 100644 lib/prockernel.c delete mode 100644 lib/proclist.c delete mode 100644 lib/procmem.c delete mode 100644 lib/procsegment.c delete mode 100644 lib/procsignal.c delete mode 100644 lib/procstate.c delete mode 100644 lib/proctime.c delete mode 100644 lib/procuid.c delete mode 100644 lib/sem_limits.c delete mode 100644 lib/shm_limits.c delete mode 100644 lib/swap.c delete mode 100644 lib/uptime.c diff --git a/lib/Makefile.am b/lib/Makefile.am index 31dda65f..51560e63 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -8,10 +8,14 @@ CFLAGS = -Wall -W @CFLAGS@ -DGTOP_SERVER=\""@LIBGTOP_SERVER@"\" lib_LTLIBRARIES = libgtop.la -libgtop_la_SOURCES = init.c open.c close.c read.c read_data.c \ - write.c command.c cpu.c mem.c swap.c uptime.c \ - loadavg.c shm_limits.c msg_limits.c \ - sem_limits.c proclist.c procstate.c procuid.c \ - proctime.c procmem.c procsignal.c prockernel.c \ - procsegment.c +libgtop_la_SOURCES = init.c open.c close.c command.c read.c read_data.c write.c lib.c +BUILT_SOURCES = lib.c + +lib.c: lib.awk $(top_builddir)/config.h $(top_builddir)/features.def + $(AWK) -f $(srcdir)/lib.awk < $(top_builddir)/features.def > lib-t + mv lib-t lib.c + +EXTRA_DIST = lib.awk + +CLEANFILES = lib.c diff --git a/lib/cpu.c b/lib/cpu.c deleted file mode 100644 index 6e20a19e..00000000 --- a/lib/cpu.c +++ /dev/null @@ -1,39 +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 , 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 -#include -#include - -/* Provides information about cpu usage. */ - -void -glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_CPU, 0); - - if (server->features & GLIBTOP_SYSDEPS_CPU) { - glibtop_call_l (server, GLIBTOP_CMND_CPU, 0, NULL, - sizeof (glibtop_cpu), buf); - } else { - glibtop_get_cpu_r (server, buf); - } -} diff --git a/lib/lib.awk b/lib/lib.awk new file mode 100644 index 00000000..fc901bcd --- /dev/null +++ b/lib/lib.awk @@ -0,0 +1,52 @@ +BEGIN { + print "/* lib.c */"; + print "/* This is a generated file. Please modify `lib.awk' */"; + print ""; + + print "#include "; + print "#include "; + print "#include "; + + print ""; + +} + +function output(feature) { + if (feature ~ /^proclist$/) { + print "unsigned *"; + prefix = "return "; + } else { + prefix = ""; + print "void"; + } + if (feature ~ /^proc_/) { + param = ", pid_t pid"; + } else { + param = ""; + } + + print "glibtop_get_"feature"_l (glibtop *server, glibtop_"feature" *buf"param")"; + print "{"; + print "\tglibtop_init_r (&server, GLIBTOP_SYSDEPS_"toupper(feature)", 0);"; + print ""; + print "\tif (server->features & GLIBTOP_SYSDEPS_"toupper(feature)") {"; + + if (feature ~ /^proc_/) { + print "\t\t"prefix"glibtop_call_l (server, GLIBTOP_CMND_"toupper(feature)", sizeof (pid_t),"; + print "\t\t\t\t&pid, sizeof (glibtop_"feature"), buf);"; + print "\t} else {"; + print "\t\t"prefix"glibtop_get_"feature"_r (server, buf, pid);"; + } else { + print "\t\t"prefix"glibtop_call_l (server, GLIBTOP_CMND_"toupper(feature)", 0, NULL,"; + print "\t\t\t sizeof (glibtop_"feature"), buf);"; + print "\t} else {"; + print "\t\t"prefix"glibtop_get_"feature"_r (server, buf);"; + } + print "\t}"; + print "}"; + print ""; +} + +/^(\w+)/ { output($1) } + + diff --git a/lib/loadavg.c b/lib/loadavg.c deleted file mode 100644 index 3e503160..00000000 --- a/lib/loadavg.c +++ /dev/null @@ -1,39 +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 , 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 -#include -#include - -/* Provides load averange. */ - -void -glibtop_get_loadavg_l (glibtop *server, glibtop_loadavg *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_LOADAVG, 0); - - if (server->features & GLIBTOP_SYSDEPS_LOADAVG) { - glibtop_call_l (server, GLIBTOP_CMND_LOADAVG, 0, NULL, - sizeof (glibtop_loadavg), buf); - } else { - glibtop_get_loadavg_r (server, buf); - } -} diff --git a/lib/mem.c b/lib/mem.c deleted file mode 100644 index 34fe5ef1..00000000 --- a/lib/mem.c +++ /dev/null @@ -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 , 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 -#include - -/* Provides information about memory usage. */ - -void -glibtop_get_mem_l (glibtop *server, glibtop_mem *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_MEM, 0); - - if (server->features & GLIBTOP_SYSDEPS_MEM) { - glibtop_call_l (server, GLIBTOP_CMND_MEM, 0, NULL, - sizeof (glibtop_mem), buf); - } else { - glibtop_get_mem_r (server, buf); - } -} diff --git a/lib/msg_limits.c b/lib/msg_limits.c deleted file mode 100644 index 16727049..00000000 --- a/lib/msg_limits.c +++ /dev/null @@ -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 , 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 -#include - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_msg_limits_l (glibtop *server, glibtop_msg_limits *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0); - - if (server->features & GLIBTOP_SYSDEPS_MSG_LIMITS) { - glibtop_call_l (server, GLIBTOP_CMND_MSG_LIMITS, 0, NULL, - sizeof (glibtop_msg_limits), buf); - } else { - glibtop_get_msg_limits_r (server, buf); - } -} diff --git a/lib/prockernel.c b/lib/prockernel.c deleted file mode 100644 index 56ff0159..00000000 --- a/lib/prockernel.c +++ /dev/null @@ -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 , 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 -#include -#include - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_kernel_l (glibtop *server, glibtop_proc_kernel *buf, - pid_t pid) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0); - - if (server->features & GLIBTOP_SYSDEPS_PROC_KERNEL) { - glibtop_call_l (server, GLIBTOP_CMND_PROC_KERNEL, sizeof (pid_t), - &pid, sizeof (glibtop_proc_kernel), buf); - } else { - glibtop_get_proc_kernel_r (server, buf, pid); - } -} diff --git a/lib/proclist.c b/lib/proclist.c deleted file mode 100644 index a82c016c..00000000 --- a/lib/proclist.c +++ /dev/null @@ -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 , 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 -#include - -/* Fetch list of currently running processes. */ - -unsigned * -glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROCLIST, 0); - - if (server->features & GLIBTOP_SYSDEPS_PROCLIST) { - return glibtop_call_l (server, GLIBTOP_CMND_PROCLIST, 0, NULL, - sizeof (glibtop_proclist), buf); - } else { - return glibtop_get_proclist_r (server, buf); - } -} diff --git a/lib/procmem.c b/lib/procmem.c deleted file mode 100644 index 26e822ca..00000000 --- a/lib/procmem.c +++ /dev/null @@ -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 , 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 -#include -#include - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_mem_l (glibtop *server, glibtop_proc_mem *buf, - pid_t pid) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_MEM, 0); - - if (server->features & GLIBTOP_SYSDEPS_PROC_MEM) { - glibtop_call_l (server, GLIBTOP_CMND_PROC_MEM, sizeof (pid_t), - &pid, sizeof (glibtop_proc_mem), buf); - } else { - glibtop_get_proc_mem_r (server, buf, pid); - } -} diff --git a/lib/procsegment.c b/lib/procsegment.c deleted file mode 100644 index 92ec5a2a..00000000 --- a/lib/procsegment.c +++ /dev/null @@ -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 , 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 -#include -#include - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_segment_l (glibtop *server, glibtop_proc_segment *buf, - pid_t pid) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0); - - if (server->features & GLIBTOP_SYSDEPS_PROC_SEGMENT) { - glibtop_call_l (server, GLIBTOP_CMND_PROC_SEGMENT, sizeof (pid_t), - &pid, sizeof (glibtop_proc_segment), buf); - } else { - glibtop_get_proc_segment_r (server, buf, pid); - } -} diff --git a/lib/procsignal.c b/lib/procsignal.c deleted file mode 100644 index d51ce115..00000000 --- a/lib/procsignal.c +++ /dev/null @@ -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 , 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 -#include -#include - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_signal_l (glibtop *server, glibtop_proc_signal *buf, - pid_t pid) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0); - - if (server->features & GLIBTOP_SYSDEPS_PROC_SIGNAL) { - glibtop_call_l (server, GLIBTOP_CMND_PROC_SIGNAL, sizeof (pid_t), - &pid, sizeof (glibtop_proc_signal), buf); - } else { - glibtop_get_proc_signal_r (server, buf, pid); - } -} diff --git a/lib/procstate.c b/lib/procstate.c deleted file mode 100644 index d1167186..00000000 --- a/lib/procstate.c +++ /dev/null @@ -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 , 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 -#include -#include - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_state_l (glibtop *server, glibtop_proc_state *buf, - pid_t pid) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_STATE, 0); - - if (server->features & GLIBTOP_SYSDEPS_PROC_STATE) { - glibtop_call_l (server, GLIBTOP_CMND_PROC_STATE, sizeof (pid_t), - &pid, sizeof (glibtop_proc_state), buf); - } else { - glibtop_get_proc_state_r (server, buf, pid); - } -} diff --git a/lib/proctime.c b/lib/proctime.c deleted file mode 100644 index ac116d00..00000000 --- a/lib/proctime.c +++ /dev/null @@ -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 , 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 -#include -#include - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_time_l (glibtop *server, glibtop_proc_time *buf, - pid_t pid) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_TIME, 0); - - if (server->features & GLIBTOP_SYSDEPS_PROC_TIME) { - glibtop_call_l (server, GLIBTOP_CMND_PROC_TIME, sizeof (pid_t), - &pid, sizeof (glibtop_proc_time), buf); - } else { - glibtop_get_proc_time_r (server, buf, pid); - } -} diff --git a/lib/procuid.c b/lib/procuid.c deleted file mode 100644 index e65da97d..00000000 --- a/lib/procuid.c +++ /dev/null @@ -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 , 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 -#include -#include - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_uid_l (glibtop *server, glibtop_proc_uid *buf, - pid_t pid) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_UID, 0); - - if (server->features & GLIBTOP_SYSDEPS_PROC_UID) { - glibtop_call_l (server, GLIBTOP_CMND_PROC_UID, sizeof (pid_t), - &pid, sizeof (glibtop_proc_uid), buf); - } else { - glibtop_get_proc_uid_r (server, buf, pid); - } -} diff --git a/lib/sem_limits.c b/lib/sem_limits.c deleted file mode 100644 index ca332d2c..00000000 --- a/lib/sem_limits.c +++ /dev/null @@ -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 , 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 -#include - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_sem_limits_l (glibtop *server, glibtop_sem_limits *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0); - - if (server->features & GLIBTOP_SYSDEPS_SEM_LIMITS) { - glibtop_call_l (server, GLIBTOP_CMND_SEM_LIMITS, 0, NULL, - sizeof (glibtop_sem_limits), buf); - } else { - glibtop_get_sem_limits_r (server, buf); - } -} diff --git a/lib/shm_limits.c b/lib/shm_limits.c deleted file mode 100644 index d59efdfc..00000000 --- a/lib/shm_limits.c +++ /dev/null @@ -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 , 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 -#include - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_shm_limits_l (glibtop *server, glibtop_shm_limits *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0); - - if (server->features & GLIBTOP_SYSDEPS_SHM_LIMITS) { - glibtop_call_l (server, GLIBTOP_CMND_SHM_LIMITS, 0, NULL, - sizeof (glibtop_shm_limits), buf); - } else { - glibtop_get_shm_limits_r (server, buf); - } -} diff --git a/lib/swap.c b/lib/swap.c deleted file mode 100644 index 8e5d33b7..00000000 --- a/lib/swap.c +++ /dev/null @@ -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 , 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 -#include - -/* Provides information about swap usage. */ - -void -glibtop_get_swap_l (glibtop *server, glibtop_swap *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_SWAP, 0); - - if (server->features & GLIBTOP_SYSDEPS_SWAP) { - glibtop_call_l (server, GLIBTOP_CMND_SWAP, 0, NULL, - sizeof (glibtop_swap), buf); - } else { - glibtop_get_swap_r (server, buf); - } -} diff --git a/lib/uptime.c b/lib/uptime.c deleted file mode 100644 index 1dcf8ae0..00000000 --- a/lib/uptime.c +++ /dev/null @@ -1,39 +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 , 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 -#include -#include - -/* Provides uptime and idle time. */ - -void -glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf) -{ - glibtop_init_r (&server, GLIBTOP_SYSDEPS_UPTIME, 0); - - if (server->features & GLIBTOP_SYSDEPS_UPTIME) { - glibtop_call_l (server, GLIBTOP_CMND_UPTIME, 0, NULL, - sizeof (glibtop_uptime), buf); - } else { - glibtop_get_uptime_r (server, buf); - } -}