New file.

1998-07-29  Martin Baulig  <martin@home-of-linux.org>

	* guile/ChangeLog: New file.

	* features.def: New format - now includes type of return value
	and parameters.

	* lib/lib.awk: Changed to use new `features.def'.
	* sysdeps/guile/guile.awk: Dito;
	* sysdeps/guile/names/guile-names.awk: Dito.

	* libgtopConf.sh.in: Added
	`LIBGTOP_NAMES_LIBS', `LIBGTOP_NAMES_INCS',
	`LIBGTOP_GUILE_NAMES_LIBS', `LIBGTOP_GUILE_NAMES_INCS',
	`LIBGTOP_MAJOR_VERSION', `LIBGTOP_MINOR_VERSION'
	`LIBGTOP_VERSION', `libgtop_sysdeps_dir'.

	* acinclude.m4 (AC_LC_SYSDEPS): Removed since this has been
	replaced with `GNOME_LIBGTOP_SYSDEPS' long ago.

	* LIBGTOP-VERSION: New file.

	* */Makefile.am (INCLUDES): Removed; now defined in `configure.in'.

	* sysdeps/names/mountlist.c: New file.

	* lib/{init, open}.c (GTOP_SERVER): Renamed to `LIBGTOP_SERVER'.

	* configure.in (INCLUDES): Added definition.
	(libgtop_want_names): Always true; `libgtop_names.la' is now
	always created since some other programs rely upon it - but
	have to use `LIBGTOP_NAMES_LIBS' and `LIBGTOP_NAMES_INCS' to
	use it in your application.
	(libgtop_want_guile_names): Always true; but you have to use
	`LIBGTOP_GUILE_NAMES_LIBS' and `LIBGTOP_GUILE_NAMES_INCS' to
	use it in your application.
	(LIBGTOP_LIBS): Removed `-lgtop_names' and `-lgtop_guile_names'.
	(LIBGTOP_NAMES_LIBS): New variable. Use it to link your
	application with the names interface.
	(LIBGTOP_NAMES_INCS): New variable. Also #defines `GLIBTOP_NAMES'
	which is now required if your application wants to use the names
	interface.
	(LIBGTOP_GUILE_NAMES_LIBS): New variable. Use it to link your
	application with the guile names interface.
	(LIBGTOP_GUILE_NAMES_INCS): New variable. Also #defines
	`GLIBTOP_NAMES' and `GLIBTOP_GUILE_NAMES' which are now required
	if your application wants to use the guile names interface.
This commit is contained in:
Martin Baulig
1998-07-29 22:01:31 +00:00
committed by Martin Baulig
parent 37eb76e767
commit f07551a43d
29 changed files with 354 additions and 337 deletions

View File

@@ -24,3 +24,4 @@ sun4sol2
support support
i386-freebsd i386-freebsd
alpha-dec-osf3.0 alpha-dec-osf3.0
i686-pc-linux-gnu-linux

View File

@@ -1,3 +1,51 @@
1998-07-29 Martin Baulig <martin@home-of-linux.org>
* guile/ChangeLog: New file.
* features.def: New format - now includes type of return value
and parameters.
* lib/lib.awk: Changed to use new `features.def'.
* sysdeps/guile/guile.awk: Dito;
* sysdeps/guile/names/guile-names.awk: Dito.
* libgtopConf.sh.in: Added
`LIBGTOP_NAMES_LIBS', `LIBGTOP_NAMES_INCS',
`LIBGTOP_GUILE_NAMES_LIBS', `LIBGTOP_GUILE_NAMES_INCS',
`LIBGTOP_MAJOR_VERSION', `LIBGTOP_MINOR_VERSION'
`LIBGTOP_VERSION', `libgtop_sysdeps_dir'.
* acinclude.m4 (AC_LC_SYSDEPS): Removed since this has been
replaced with `GNOME_LIBGTOP_SYSDEPS' long ago.
* LIBGTOP-VERSION: New file.
* */Makefile.am (INCLUDES): Removed; now defined in `configure.in'.
* sysdeps/names/mountlist.c: New file.
* lib/{init, open}.c (GTOP_SERVER): Renamed to `LIBGTOP_SERVER'.
* configure.in (INCLUDES): Added definition.
(libgtop_want_names): Always true; `libgtop_names.la' is now
always created since some other programs rely upon it - but
have to use `LIBGTOP_NAMES_LIBS' and `LIBGTOP_NAMES_INCS' to
use it in your application.
(libgtop_want_guile_names): Always true; but you have to use
`LIBGTOP_GUILE_NAMES_LIBS' and `LIBGTOP_GUILE_NAMES_INCS' to
use it in your application.
(LIBGTOP_LIBS): Removed `-lgtop_names' and `-lgtop_guile_names'.
(LIBGTOP_NAMES_LIBS): New variable. Use it to link your
application with the names interface.
(LIBGTOP_NAMES_INCS): New variable. Also #defines `GLIBTOP_NAMES'
which is now required if your application wants to use the names
interface.
(LIBGTOP_GUILE_NAMES_LIBS): New variable. Use it to link your
application with the guile names interface.
(LIBGTOP_GUILE_NAMES_INCS): New variable. Also #defines
`GLIBTOP_NAMES' and `GLIBTOP_GUILE_NAMES' which are now required
if your application wants to use the guile names interface.
1998-07-24 Martin Baulig <martin@home-of-linux.org> 1998-07-24 Martin Baulig <martin@home-of-linux.org>
* sysdeps/common/mountlist.c (glibtop_get_mountlist_s): * sysdeps/common/mountlist.c (glibtop_get_mountlist_s):

7
LIBGTOP-VERSION Normal file
View File

@@ -0,0 +1,7 @@
LIBGTOP_MAJOR_VERSION=0
LIBGTOP_MINOR_VERSION=2a
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION
# For automake.
VERSION=$LIBGTOP_VERSION
PACKAGE=libgtop

View File

@@ -1,14 +1,18 @@
## Process this file with automake to produce Makefile.in. ## Process this file with automake to produce Makefile.in.
if GLIBTOP_EXAMPLES
examples_SUBDIRS = examples examples_SUBDIRS = examples
if GUILE
guile_SUBDIRS = guile
else
guile_SUBDIRS =
endif endif
built_SUBDIRS = include sysdeps lib src
SUBDIRS = po intl support macros $(built_SUBDIRS) $(examples_SUBDIRS) SUBDIRS = po intl support macros include sysdeps lib src \
$(guile_subdirs) $(examples_SUBDIRS)
DIST_SUBDIRS = po intl macros include sysdeps src lib examples DIST_SUBDIRS = po intl macros include sysdeps src lib guile examples
include_HEADERS = glibtop.h include_HEADERS = glibtop.h
@@ -41,16 +45,21 @@ libgtopConf.sh: libgtopConf.sh.in Makefile
-e 's,\@LIBGTOP_INCLUDEDIR\@,$(includedir),g' \ -e 's,\@LIBGTOP_INCLUDEDIR\@,$(includedir),g' \
-e 's,\@LIBGTOP_LIBS\@,$(LIBGTOP_LIBS),g' \ -e 's,\@LIBGTOP_LIBS\@,$(LIBGTOP_LIBS),g' \
-e 's,\@LIBGTOP_INCS\@,$(LIBGTOP_INCS),g' \ -e 's,\@LIBGTOP_INCS\@,$(LIBGTOP_INCS),g' \
-e 's,\@LIBGTOP_NAMES_LIBS\@,$(LIBGTOP_NAMES_LIBS),g' \
-e 's,\@LIBGTOP_NAMES_INCS\@,$(LIBGTOP_NAMES_INCS),g' \
-e 's,\@LIBGTOP_GUILE_LIBS\@,$(LIBGTOP_GUILE_LIBS),g' \ -e 's,\@LIBGTOP_GUILE_LIBS\@,$(LIBGTOP_GUILE_LIBS),g' \
-e 's,\@LIBGTOP_GUILE_INCS\@,$(LIBGTOP_GUILE_INCS),g' \ -e 's,\@LIBGTOP_GUILE_INCS\@,$(LIBGTOP_GUILE_INCS),g' \
-e 's,\@LIBGTOP_GUILE_NAMES_LIBS\@,$(LIBGTOP_GUILE_NAMES_LIBS),g' \
-e 's,\@LIBGTOP_GUILE_NAMES_INCS\@,$(LIBGTOP_GUILE_NAMES_INCS),g' \
-e 's,\@LIBGTOP_BINDIR\@,$(LIBGTOP_BINDIR),g' \ -e 's,\@LIBGTOP_BINDIR\@,$(LIBGTOP_BINDIR),g' \
-e 's,\@LIBGTOP_SERVER\@,$(LIBGTOP_SERVER),g' \ -e 's,\@LIBGTOP_SERVER\@,$(LIBGTOP_SERVER),g' \
-e 's,\@LIBGTOP_MAJOR_VERSION\@,$(LIBGTOP_MAJOR_VERSION),g' \
-e 's,\@LIBGTOP_MINOR_VERSION\@,$(LIBGTOP_MINOR_VERSION),g' \
-e 's,\@LIBGTOP_VERSION\@,$(LIBGTOP_VERSION),g' \
-e 's,\@libgtop_sysdeps_dir\@,$(libgtop_sysdeps_dir),g' \ -e 's,\@libgtop_sysdeps_dir\@,$(libgtop_sysdeps_dir),g' \
-e 's,\@libgtop_need_server\@,$(libgtop_need_server),g' \ -e 's,\@libgtop_need_server\@,$(libgtop_need_server),g' \
-e 's,\@libgtop_use_machine_h\@,$(libgtop_use_machine_h),g' \ -e 's,\@libgtop_use_machine_h\@,$(libgtop_use_machine_h),g' \
-e 's,\@libgtop_guile_found\@,$(libgtop_guile_found),g' \ -e 's,\@libgtop_guile_found\@,$(libgtop_guile_found),g' \
-e 's,\@libgtop_want_names\@,$(libgtop_want_names),g' \
-e 's,\@libgtop_want_guile_names\@,$(libgtop_want_guile_names),g' \
-e 's,\@libgtop_want_examples\@,$(libgtop_want_examples),g' \ -e 's,\@libgtop_want_examples\@,$(libgtop_want_examples),g' \
< $(srcdir)/libgtopConf.sh.in > libgtopConf.tmp \ < $(srcdir)/libgtopConf.sh.in > libgtopConf.tmp \
&& mv libgtopConf.tmp libgtopConf.sh && mv libgtopConf.tmp libgtopConf.sh

View File

@@ -10,97 +10,6 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE. dnl PARTICULAR PURPOSE.
AC_DEFUN([AC_LC_CANONICAL_HOST],[
AC_REQUIRE([AC_CANONICAL_HOST])
# The way shlib-versions is used to generate soversions.mk uses a
# fairly simplistic model for name recognition that can't distinguish
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
# of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can
# tell. This doesn't get used much beyond that, so it's fairly safe.
case "$host_os" in
linux*)
;;
gnu*)
host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
;;
esac
])
AC_DEFUN([AC_LC_SYSDEPS],[
AC_REQUIRE([AC_LC_CANONICAL_HOST])
AC_REQUIRE([GNOME_LIBGTOP_SYSDEPS])
AC_MSG_CHECKING(whether we need the gtop_server)
AC_ARG_ENABLE(libgtop-server,
[ --enable-libgtop-server use gtop_server [default=auto]],
[if test "x$enableval" = "xyes" ; then
libgtop_need_server=yes
elif test "x$enableval" = "xno" ; then
libgtop_need_server=no
fi])
AC_MSG_RESULT($libgtop_need_server)
AC_MSG_CHECKING(whether building of libgtop names is requested)
AC_ARG_ENABLE(libgtop-names,
[ --enable-libgtop-names enable building of 'names' subdirs [default=yes]],
[if test "x$enableval" = "xyes" ; then
libgtop_want_names=yes
else
libgtop_want_names=$enableval
fi],[libgtop_want_names=yes])
AC_MSG_RESULT($libgtop_want_names)
if test x$libgtop_want_names = xyes ; then
AC_DEFINE(GLIBTOP_NAMES)
fi
AM_CONDITIONAL(GLIBTOP_NAMES, test x$libgtop_want_names = xyes)
AC_MSG_CHECKING(whether building of the guile interface is requested)
AC_ARG_ENABLE(libgtop-guile,
[ --enable-libgtop-guile enable building of the guile interface [default=yes]],
[if test "x$enableval" = "xyes" ; then
libgtop_want_guile=yes
else
libgtop_want_guile=$enableval
fi],[libgtop_want_guile=yes])
AC_MSG_RESULT($libgtop_want_guile)
AC_MSG_CHECKING(whether building of the examples is requested)
AC_ARG_ENABLE(libgtop-examples,
[ --disable-libgtop-examples disable building of the examples],
[if test "x$enableval" = "xyes" ; then
libgtop_want_examples=yes
else
libgtop_want_examples=$enableval
fi],[libgtop_want_examples=yes])
AC_MSG_RESULT($libgtop_want_examples)
if test x$libgtop_want_examples = xyes ; then
AC_DEFINE(GLIBTOP_EXAMPLES)
fi
AM_CONDITIONAL(GLIBTOP_EXAMPLES, test x$libgtop_want_examples = xyes)
if test x$libgtop_use_machine_h = xyes ; then
machine_incs="-I\$(top_srcdir)/sysdeps/$sysdeps_dir"
fi
AC_SUBST(machine_incs)
AC_SUBST(libgtop_want_names)
AC_SUBST(libgtop_want_guile)
AC_SUBST(libgtop_want_examples)
])
###################################################################### ######################################################################
# progtest.m4 from gettext 0.32 # progtest.m4 from gettext 0.32
###################################################################### ######################################################################

View File

@@ -6,7 +6,12 @@ AC_INIT(copyright.txt)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(libgtop, 0.01) . $srcdir/LIBGTOP-VERSION
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AC_SUBST(LIBGTOP_MAJOR_VERSION)
AC_SUBST(LIBGTOP_MINOR_VERSION)
AC_SUBST(LIBGTOP_VERSION)
AM_ACLOCAL_INCLUDE(macros) AM_ACLOCAL_INCLUDE(macros)
@@ -47,24 +52,19 @@ else
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes) AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
fi fi
AC_LC_SYSDEPS GNOME_LIBGTOP_SYSDEPS
libgtop_want_guile=yes
if test x$libgtop_want_guile = xyes ; then if test x$libgtop_want_guile = xyes ; then
GNOME_CHECK_GUILE GNOME_CHECK_GUILE
if test x$ac_cv_guile_found = xyes ; then
if test x$libgtop_want_names = xyes ; then
AC_DEFINE(GLIBTOP_GUILE_NAMES) AC_DEFINE(GLIBTOP_GUILE_NAMES)
fi
guile_examples='third third_static' guile_examples='third third_static'
guile_subdirs='guile' guile_subdirs='guile'
else else
guile_examples= guile_examples=
guile_subdirs= guile_subdirs=
fi fi
else
guile_examples=
guile_subdirs=
fi
AC_SUBST(guile_examples) AC_SUBST(guile_examples)
AC_SUBST(guile_subdirs) AC_SUBST(guile_subdirs)
@@ -131,12 +131,6 @@ AC_SUBST(libs_xauth)
dnl For diskusage stuff dnl For diskusage stuff
GNOME_FILEUTILS_CHECKS GNOME_FILEUTILS_CHECKS
CFLAGS="$CFLAGS -D_IN_LIBGTOP"
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],AC_DEFINE(GNOME_ENABLE_DEBUG),) AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],AC_DEFINE(GNOME_ENABLE_DEBUG),)
dnl If you want to use libgtop without gnome, uncomment the following paragraph: dnl If you want to use libgtop without gnome, uncomment the following paragraph:
@@ -178,44 +172,41 @@ fi
AC_SUBST(libgtop_guile_found) AC_SUBST(libgtop_guile_found)
if test x$libgtop_want_names = xyes ; then LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_common -lgtop_sysdeps"
if test x$ac_cv_guile_found = xyes ; then LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_common -lgtop_sysdeps"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names"
libgtop_want_guile_names=yes
else
libgtop_want_guile_names=no
fi
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_names"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_names"
fi
AC_SUBST(libgtop_want_guile_names) LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names"
LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names"
LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_names"
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_common $libs_xauth" LIBGTOP_LIBS="$LIBGTOP_LIBS $libs_xauth"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_common $libs_xauth" LIBGTOP_NAMES_LIBS="$LIBGTOP_NAMES_LIBS $libs_xauth"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS $libs_xauth"
LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_NAMES_LIBS $libs_xauth"
if test "x$need_server" = "xyes" ; then LIBGTOP_NAMES_INCS="$LIBGTOP_INCS -DGLIBTOP_NAMES"
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop" LIBGTOP_GUILE_NAMES_INCS="$LIBGTOP_GUILE_INCS -DGLIBTOP_GUILE_NAMES"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop" LIBGTOP_GUILE_NAMES_INCS="$LIBGTOP_GUILE_INCS -DGLIBTOP_NAMES"
else
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_sysdeps"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_sysdeps"
fi
if test "x$ac_cv_guile_found" = "xyes" ; then
LIBGTOP_INCS="$LIBGTOP_INCS $GUILE_INCS"
LIBGTOP_GUILE_INCS="$LIBGTOP_INCS $GUILE_INCS"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS $GUILE_LIBS" LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS $GUILE_LIBS"
fi LIBGTOP_GUILE_INCS="$LIBGTOP_GUILE_INCS $GUILE_INCS"
machine_incs='-I$(top_srcdir)/sysdeps/@sysdeps_dir@' machine_incs="-I\$(top_srcdir)/sysdeps/$sysdeps_dir"
AC_SUBST(machine_incs) AC_SUBST(machine_incs)
INCLUDES="$CFLAGS -D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -DGLIBTOP_GUILE -DGLIBTOP_GUILE_NAMES -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_srcdir)/intl $GUILE_INCS "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\"'
AC_SUBST(INCLUDES)
AC_SUBST(LIBGTOP_LIBS) AC_SUBST(LIBGTOP_LIBS)
AC_SUBST(LIBGTOP_INCS) AC_SUBST(LIBGTOP_INCS)
AC_SUBST(LIBGTOP_NAMES_LIBS)
AC_SUBST(LIBGTOP_NAMES_INCS)
AC_SUBST(LIBGTOP_GUILE_LIBS) AC_SUBST(LIBGTOP_GUILE_LIBS)
AC_SUBST(LIBGTOP_GUILE_INCS) AC_SUBST(LIBGTOP_GUILE_INCS)
AC_SUBST(LIBGTOP_GUILE_NAMES_LIBS)
AC_SUBST(LIBGTOP_GUILE_NAMES_INCS)
AC_SUBST(LIBGTOP_BINDIR) AC_SUBST(LIBGTOP_BINDIR)
AC_SUBST(LIBGTOP_SERVER) AC_SUBST(LIBGTOP_SERVER)
@@ -258,6 +249,7 @@ src/Makefile
src/server/Makefile src/server/Makefile
src/daemon/Makefile src/daemon/Makefile
lib/Makefile lib/Makefile
guile/Makefile
examples/Makefile examples/Makefile
perl/Makefile.PL perl/Makefile.PL
support/Makefile support/Makefile

View File

@@ -2,10 +2,6 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ -O0 CFLAGS = -Wall -W @CFLAGS@ -O0
DEFS = @DEFS@ DEFS = @DEFS@
@@ -36,10 +32,8 @@ second_static_SOURCES = $(second_SOURCES)
second_static_LDADD = $(second_LDADD) second_static_LDADD = $(second_LDADD)
second_static_LDFLAGS = -static second_static_LDFLAGS = -static
if GLIBTOP_NAMES
third_guile_names_LIBS = $(top_builddir)/sysdeps/guile/names/libgtop_guile_names.la third_guile_names_LIBS = $(top_builddir)/sysdeps/guile/names/libgtop_guile_names.la
third_names_LIBS = $(top_builddir)/sysdeps/names/libgtop_names.la third_names_LIBS = $(top_builddir)/sysdeps/names/libgtop_names.la
endif
third_SOURCES = third.c third_SOURCES = third.c
third_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile.la \ third_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile.la \

View File

@@ -1,18 +1,18 @@
cpu ulong(total,user,nice,sys,idle,frequency) void|cpu|ulong(total,user,nice,sys,idle,frequency)
mem ulong(total,used,free,shared,buffer,cached,user,locked) void|mem|ulong(total,used,free,shared,buffer,cached,user,locked)
swap ulong(total,used,free) void|swap|ulong(total,used,free)
uptime double(uptime,idletime) void|uptime|double(uptime,idletime)
loadavg double(loadavg[0],loadavg[1],loadavg[2]) void|loadavg|double(loadavg[0],loadavg[1],loadavg[2])
shm_limits ulong(shmmax,shmmin,shmmni,shmseg,shmall) void|shm_limits|ulong(shmmax,shmmin,shmmni,shmseg,shmall)
msg_limits ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql) void|msg_limits|ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql)
sem_limits ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem) void|sem_limits|ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem)
proclist ulong(number,size,total) unsigned *|proclist|ulong(number,size,total)
proc_state str(cmd):char(state):ulong(uid,gid) void|proc_state|str(cmd):char(state):ulong(uid,gid)|pid_t|pid
proc_uid long(uid,euid,gid,egid,pid,ppid,pgrp,session,tty,tpgid,priority,nice) void|proc_uid|long(uid,euid,gid,egid,pid,ppid,pgrp,session,tty,tpgid,priority,nice)|pid_t|pid
proc_mem long(size,vsize,resident,share,rss,rss_rlim) void|proc_mem|long(size,vsize,resident,share,rss,rss_rlim)|pid_t|pid
proc_time long(start_time,utime,stime,cutime,cstime,timeout,it_real_value) void|proc_time|long(start_time,utime,stime,cutime,cstime,timeout,it_real_value)|pid_t|pid
proc_signal ulong(signal,blocked,sigignore,sigcatch) void|proc_signal|ulong(signal,blocked,sigignore,sigcatch)|pid_t|pid
proc_kernel ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,wchan) void|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,wchan)|pid_t|pid
proc_segment long(trs,lrs,drs,dt):ulong(start_code,end_code,start_stack) void|proc_segment|long(trs,lrs,drs,dt):ulong(start_code,end_code,start_stack)|pid_t|pid
@mountlist ulong(number,size,total) glibtop_mountentry *|@mountlist|ulong(number,size,total)|int|all_fs
fsusage ulong(blocks,bfree,bavail,files,ffree) void|@fsusage|ulong(blocks,bfree,bavail,files,ffree)|const char *|mount_dir|strlen (mount_dir) + 1

View File

@@ -63,6 +63,36 @@ extern glibtop_mountentry *glibtop_get_mountlist_l __P((glibtop *, glibtop_mount
extern glibtop_mountentry *glibtop_get_mountlist_s __P((glibtop *, glibtop_mountlist *, int)); extern glibtop_mountentry *glibtop_get_mountlist_s __P((glibtop *, glibtop_mountlist *, int));
#ifdef HAVE_GUILE
/* You need to link with -lgtop_guile to get this stuff here. */
extern SCM glibtop_guile_get_mountlist __P((SCM));
#endif
#ifdef GLIBTOP_GUILE_NAMES
/* You need to link with -lgtop_guile_names to get this stuff here. */
extern SCM glibtop_guile_names_mountlist __P((void));
extern SCM glibtop_guile_types_mountlist __P((void));
extern SCM glibtop_guile_labels_mountlist __P((void));
extern SCM glibtop_guile_descriptions_mountlist __P((void));
#endif
#ifdef GLIBTOP_NAMES
/* You need to link with -lgtop_names to get this stuff here. */
extern const char *glibtop_names_mountlist [];
extern const unsigned glibtop_types_mountlist [];
extern const char *glibtop_labels_mountlist [];
extern const char *glibtop_descriptions_mountlist [];
#endif
__END_DECLS __END_DECLS
#endif #endif

View File

@@ -1,10 +1,6 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \ CFLAGS = -Wall -W @CFLAGS@
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ -DGTOP_SERVER=\""@LIBGTOP_SERVER@"\"
lib_LTLIBRARIES = libgtop.la lib_LTLIBRARIES = libgtop.la

View File

@@ -41,7 +41,7 @@ _init_server (glibtop *server, const unsigned features)
if (server->server_command == NULL) { if (server->server_command == NULL) {
const char *temp = getenv ("LIBGTOP_SERVER") ? const char *temp = getenv ("LIBGTOP_SERVER") ?
getenv ("LIBGTOP_SERVER") : GTOP_SERVER; getenv ("LIBGTOP_SERVER") : LIBGTOP_SERVER;
server->server_command = glibtop_strdup_r (server, temp); server->server_command = glibtop_strdup_r (server, temp);
} }

View File

@@ -11,30 +11,46 @@ BEGIN {
print ""; print "";
} }
function output(feature) { function output(line) {
orig = feature; split (line, line_fields, /\|/);
sub(/@/,"",feature); retval = line_fields[1];
if (feature ~ /^proclist$/) { feature = line_fields[2];
print "unsigned *"; param_typ = line_fields[4];
prefix = "return "; param = line_fields[5];
} else if (feature ~ /^mountlist$/) { param_size = line_fields[6];
print "glibtop_mountentry *";
prefix = "return "; if (param_typ == "") {
param_size = "0";
param_ptr = "NULL";
} else { } else {
prefix = ""; if (param_size == "")
print "void"; param_size = "sizeof ("param_typ")";
}
if (feature ~ /^proc_/) { if (param_typ ~ /*/)
param = ", pid_t pid"; param_ptr = param;
} else if (feature ~ /^fsusage$/) { else
param = ", const char *mountdir"; param_ptr = "&"param;
} else if (feature ~ /^mountlist$/) { }
param = ", int all_fs";
} else { orig = feature; sub(/^@/,"",feature);
param = ""; space = feature; gsub(/./," ",space);
print retval;
if (retval !~ /^void$/) {
prefix = "return ";
prefix_space = " ";
} else {
prefix = "";
prefix_space = "";
}
if (param_typ != "") {
print "glibtop_get_"feature"_l (glibtop *server, glibtop_"feature" *buf,";
print " "space" "param_typ" "param")";
} else {
print "glibtop_get_"feature"_l (glibtop *server, glibtop_"feature" *buf)";
} }
print "glibtop_get_"feature"_l (glibtop *server, glibtop_"feature" *buf"param")";
print "{"; print "{";
print "\tglibtop_init_r (&server, GLIBTOP_SYSDEPS_"toupper(feature)", 0);"; print "\tglibtop_init_r (&server, GLIBTOP_SYSDEPS_"toupper(feature)", 0);";
print ""; print "";
@@ -42,59 +58,40 @@ function output(feature) {
print "\t (server->features & (1 << GLIBTOP_SYSDEPS_"toupper(feature)")))"; print "\t (server->features & (1 << GLIBTOP_SYSDEPS_"toupper(feature)")))";
print "\t{"; print "\t{";
if (feature ~ /^proc_/) { if (param == "")
print "\t\tglibtop_call_l (server, GLIBTOP_CMND_"toupper(feature)","; print "\t\t"prefix"glibtop_call_l (server, GLIBTOP_CMND_"toupper(feature)", 0, NULL,";
print "\t\t\t\tsizeof (pid_t), &pid,"; else
print "\t\t\t\tsizeof (glibtop_"feature"),"; print "\t\t"prefix"glibtop_call_l (server, GLIBTOP_CMND_"toupper(feature)",";
print "\t\t\t\tbuf);";
print "\t} else {"; if (param == "") {
print "#if (!GLIBTOP_SUID_"toupper(feature)")"; print "\t\t\t\t"prefix_space"sizeof (glibtop_"feature"), buf);";
print "\t\tglibtop_get_"feature"_r (server, buf, pid);";
} else if (feature ~ /^fsusage$/) {
print "\t\tglibtop_call_l (server, GLIBTOP_CMND_"toupper(feature)",";
print "\t\t\t\tstrlen (mountdir) + 1, mountdir,";
print "\t\t\t\tsizeof (glibtop_"feature"), buf);";
print "\t} else {";
print "#if (!GLIBTOP_SUID_"toupper(feature)")";
print "\t\tglibtop_get_"feature"_r (server, buf, mountdir);";
} else { } else {
if (feature ~ /^mountlist$/) { print "\t\t\t\t"prefix_space""param_size", "param_ptr",";
print "\t\treturn glibtop_call_l (server, GLIBTOP_CMND_MOUNTLIST,"; print "\t\t\t\t"prefix_space"sizeof (glibtop_"feature"),";
print "\t\t\t\t sizeof (all_fs), &all_fs,"; print "\t\t\t\t"prefix_space"buf);";
print "\t\t\t\t sizeof (glibtop_mountlist),";
print "\t\t\t\t buf);";
} else if (feature ~ /^proclist$/) {
print "\t\treturn glibtop_call_l (server, GLIBTOP_CMND_PROCLIST,";
print "\t\t\t\t 0, NULL, sizeof (glibtop_proclist),";
print "\t\t\t\t buf);";
} else {
print "\t\tglibtop_call_l (server, GLIBTOP_CMND_"toupper(feature)", 0, NULL,";
print "\t\t\t\tsizeof (glibtop_"feature"), buf);";
} }
print "\t} else {"; print "\t} else {";
if (orig ~ /^@/) {
if (feature ~ /^mountlist$/) { if (orig !~ /^@/)
print "\t\t"prefix"glibtop_get_"feature"_r (server, buf, all_fs);";
} else {
print "\t\t"prefix"glibtop_get_"feature"_s (server, buf);";
}
} else {
print "#if (!GLIBTOP_SUID_"toupper(feature)")"; print "#if (!GLIBTOP_SUID_"toupper(feature)")";
if (param == "")
print "\t\t"prefix"glibtop_get_"feature"_r (server, buf);"; print "\t\t"prefix"glibtop_get_"feature"_r (server, buf);";
} else
} print "\t\t"prefix"glibtop_get_"feature"_r (server, buf, "param");";
if (!(orig ~ /^@/)) {
if (orig !~ /^@/) {
print "#else"; print "#else";
print "\t\terrno = ENOSYS;"; print "\t\terrno = ENOSYS;";
print "\t\tglibtop_error_io_r (server, \"glibtop_get_"feature"\");"; print "\t\tglibtop_error_io_r (server, \"glibtop_get_"feature"\");";
print "#endif"; print "#endif";
} }
print "\t}"; print "\t}";
print "}"; print "}";
print ""; print "";
} }
/^@(\w+)/ { output($1) } /^[^#]/ { output($0) }
/^(\w+)/ { output($1) }

View File

@@ -101,7 +101,7 @@ glibtop_open_l (glibtop *server, const char *program_name,
break; break;
case GLIBTOP_METHOD_PIPE: case GLIBTOP_METHOD_PIPE:
fprintf (stderr, "Opening pipe to server (%s).\n", fprintf (stderr, "Opening pipe to server (%s).\n",
GTOP_SERVER); LIBGTOP_SERVER);
if (pipe (server->input) || pipe (server->output)) if (pipe (server->input) || pipe (server->output))
glibtop_error_io_r (server, "cannot make a pipe"); glibtop_error_io_r (server, "cannot make a pipe");
@@ -115,15 +115,17 @@ glibtop_open_l (glibtop *server, const char *program_name,
close (server->input [0]); close (server->output [1]); close (server->input [0]); close (server->output [1]);
dup2 (server->input [1], 1); dup2 (server->input [1], 1);
dup2 (server->output [0], 0); dup2 (server->output [0], 0);
execl (GTOP_SERVER, NULL); execl (LIBGTOP_SERVER, NULL);
glibtop_error_io_r (server, "execl (%s)", GTOP_SERVER); glibtop_error_io_r (server, "execl (%s)",
LIBGTOP_SERVER);
_exit (2); _exit (2);
} }
close (server->input [1]); close (server->input [1]);
close (server->output [0]); close (server->output [0]);
sprintf (version, "%s server %s ready.\n", PACKAGE, VERSION); sprintf (version, "Libgtop server %s ready.\n",
LIBGTOP_VERSION);
glibtop_read_l (server, sizeof (nbytes), &nbytes); glibtop_read_l (server, sizeof (nbytes), &nbytes);
@@ -135,7 +137,7 @@ glibtop_open_l (glibtop *server, const char *program_name,
if (memcmp (version, buffer, strlen (version))) if (memcmp (version, buffer, strlen (version)))
glibtop_error_r (server, "server version is not %s", glibtop_error_r (server, "server version is not %s",
VERSION); LIBGTOP_VERSION);
break; break;
} }

View File

@@ -8,18 +8,26 @@ LIBGTOP_INCLUDEDIR="@LIBGTOP_INCLUDEDIR@"
LIBGTOP_LIBS="@LIBGTOP_LIBS@" LIBGTOP_LIBS="@LIBGTOP_LIBS@"
LIBGTOP_INCS="@LIBGTOP_INCS@" LIBGTOP_INCS="@LIBGTOP_INCS@"
LIBGTOP_NAMES_LIBS="@LIBGTOP_NAMES_LIBS@"
LIBGTOP_NAMES_INCS="@LIBGTOP_NAMES_INCS@"
LIBGTOP_GUILE_LIBS="@LIBGTOP_GUILE_LIBS@" LIBGTOP_GUILE_LIBS="@LIBGTOP_GUILE_LIBS@"
LIBGTOP_GUILE_INCS="@LIBGTOP_GUILE_INCS@" LIBGTOP_GUILE_INCS="@LIBGTOP_GUILE_INCS@"
LIBGTOP_GUILE_NAMES_LIBS="@LIBGTOP_GUILE_NAMES_LIBS@"
LIBGTOP_GUILE_NAMES_INCS="@LIBGTOP_GUILE_NAMES_INCS@"
LIBGTOP_BINDIR="@LIBGTOP_BINDIR@" LIBGTOP_BINDIR="@LIBGTOP_BINDIR@"
LIBGTOP_SERVER="@LIBGTOP_SERVER@" LIBGTOP_SERVER="@LIBGTOP_SERVER@"
LIBGTOP_MAJOR_VERSION="@LIBGTOP_MAJOR_VERSION@"
LIBGTOP_MINOR_VERSION="@LIBGTOP_MINOR_VERSION@"
LIBGTOP_VERSION="@LIBGTOP_VERSION@"
libgtop_sysdeps_dir="@libgtop_sysdeps_dir@" libgtop_sysdeps_dir="@libgtop_sysdeps_dir@"
libgtop_need_server="@libgtop_need_server@" libgtop_need_server="@libgtop_need_server@"
libgtop_use_machine_h="@libgtop_use_machine_h@" libgtop_use_machine_h="@libgtop_use_machine_h@"
libgtop_guile_found="@libgtop_guile_found@" libgtop_guile_found="@libgtop_guile_found@"
libgtop_want_names="@libgtop_want_names@"
libgtop_want_guile_names="@libgtop_want_guile_names@"
libgtop_want_examples="@libgtop_want_examples@" libgtop_want_examples="@libgtop_want_examples@"

View File

@@ -1,11 +1,6 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ \ CFLAGS = -Wall -W @CFLAGS@ \
-DGTOP_SERVER=\""@LIBGTOP_SERVER@"\" \
-DDEBUG -DREAL_DEBUG -D_BSD \ -DDEBUG -DREAL_DEBUG -D_BSD \
-DLIBGTOP_DAEMON_SLAVE -DLIBGTOP_DAEMON_SLAVE

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
bin_PROGRAMS = gtop_server bin_PROGRAMS = gtop_server

View File

@@ -4,12 +4,6 @@ else
guile_SUBDIRS = guile_SUBDIRS =
endif endif
if GLIBTOP_NAMES SUBDIRS = @sysdeps_dir@ common names $(guile_SUBDIRS)
names_SUBDIRS = names
else
names_SUBDIRS =
endif
SUBDIRS = @sysdeps_dir@ common $(names_SUBDIRS) $(guile_SUBDIRS)
DIST_SUBDIRS = common guile linux kernel names osf1 stub sun4 DIST_SUBDIRS = common guile linux kernel names osf1 stub sun4

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_common.la libgtop_suid_common.la lib_LTLIBRARIES = libgtop_common.la libgtop_suid_common.la

View File

@@ -1,15 +1,7 @@
if GLIBTOP_NAMES
SUBDIRS = names SUBDIRS = names
endif
DIST_SUBDIRS = names
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_guile.la lib_LTLIBRARIES = libgtop_guile.la
@@ -25,3 +17,4 @@ guile.c: guile.awk $(top_builddir)/config.h $(top_srcdir)/features.def
EXTRA_DIST = guile.awk EXTRA_DIST = guile.awk
CLEANFILES = guile.c CLEANFILES = guile.c

View File

@@ -16,32 +16,53 @@ BEGIN {
convert["double"] = "gh_double2scm"; convert["double"] = "gh_double2scm";
convert["str"] = "gh_str02scm "; convert["str"] = "gh_str02scm ";
convert["char"] = "gh_char2scm "; convert["char"] = "gh_char2scm ";
backconv["int"] = "gh_scm2long";
backconv["pid_t"] = "gh_scm2ulong";
} }
/^(\w+)/ { function make_output(line) {
features[$1] = $1; split (line, line_fields, /\|/);
if ($1 ~ /^proclist$/) { retval = line_fields[1];
output = "SCM\nglibtop_guile_get_proclist (void)\n{\n"; element_def = line_fields[3];
output = output"\tglibtop_proclist proclist;\n\tunsigned i, *ptr;\n"; feature = line_fields[2];
output = output"\tSCM list;\n\n\tptr = glibtop_get_proclist (&proclist);\n\n"; param_typ = line_fields[4];
output = output"\tlist = gh_list (gh_ulong2scm ("$1".flags),\n\t\t\t"; param = line_fields[5];
} else { param_size = line_fields[6];
if ($1 ~ /^proc_/) {
output = "SCM\nglibtop_guile_get_"$1" (SCM pid)\n{\n"; sub(/^@/,"",feature);
output = output"\tglibtop_"$1" "$1";\n\n"; features[feature] = feature;
output = output"\tglibtop_get_"$1" (&"$1", (pid_t) gh_scm2long (pid));\n\n";
} else if ($1 ~ /^fsusage$/) { if (param == "")
output = "SCM\nglibtop_guile_get_"$1" (SCM mountdir)\n{\n"; output = "SCM\nglibtop_guile_get_"feature" (void)\n{\n";
output = output"\tglibtop_"$1" "$1";\n\n"; else
output = output"\tglibtop_get_"$1" (&"$1", gh_scm2newstr (mountdir, NULL));\n\n"; output = "SCM\nglibtop_guile_get_"feature" (SCM "param")\n{\n";
} else {
output = "SCM\nglibtop_guile_get_"$1" (void)\n{\n"; output = output"\tglibtop_"feature" "feature";\n";
output = output"\tglibtop_"$1" "$1";\n\n"; if (retval != "void")
output = output"\tglibtop_get_"$1" (&"$1");\n\n"; output = output"\t"retval" retval;\n";
} if (feature ~ /^proclist$/)
output = output"\treturn gh_list (gh_ulong2scm ("$1".flags),\n\t\t\t"; output = output"\tunsigned i;\n";
} output = output"\tSCM list;\n\n";
nr_elements = split ($2, elements, /:/);
if (retval != "void")
prefix="retval = ";
else
prefix="";
if (param_typ == "const char *")
param_conv = "gh_scm2newstr ("param", NULL)";
else if (param_typ != "")
param_conv = backconv[param_typ]" ("param")";
if (param == "")
output = output"\t"prefix"glibtop_get_"feature" (&"feature");\n\n";
else
output = output"\t"prefix"glibtop_get_"feature" (&"feature", "param_conv");\n\n";
output = output"\tlist = gh_list (gh_ulong2scm ("feature".flags),\n\t\t\t";
nr_elements = split (element_def, elements, /:/);
for (element = 1; element <= nr_elements; element++) { for (element = 1; element <= nr_elements; element++) {
list = elements[element]; list = elements[element];
type = elements[element]; type = elements[element];
@@ -49,30 +70,33 @@ BEGIN {
sub(/^\w+\(/, "", list); sub(/\)$/, "", list); sub(/^\w+\(/, "", list); sub(/\)$/, "", list);
count = split (list, fields, /,/); count = split (list, fields, /,/);
for (field = 1; field <= count; field++) { for (field = 1; field <= count; field++) {
output = output""convert[type]" ("$1"."fields[field]"),\n\t\t\t"; output = output""convert[type]" ("feature"."fields[field]"),\n\t\t\t";
} }
} }
output = output"SCM_UNDEFINED);"; output = output"SCM_UNDEFINED);\n";
print output; print output;
if ($1 ~ /^proclist$/) { if (feature ~ /^proclist$/) {
print "\tif (retval == NULL)";
print "\t\treturn list;";
print ""; print "";
print "\tif (ptr) {"; print "\tfor (i = 0; i < proclist.number; i++)";
print "\t\tfor (i = 0; i < proclist.number; i++)"; print "\t\tlist = scm_append";
print "\t\t\tlist = scm_append"; print "\t\t\t(gh_list (list,";
print "\t\t\t\t(gh_list (list,"; print "\t\t\t\t gh_list (gh_ulong2scm ((unsigned long) retval [i])),";
print "\t\t\t\t\t gh_list (gh_ulong2scm ((unsigned long) ptr [i])),"; print "\t\t\t\t SCM_UNDEFINED));";
print "\t\t\t\t\t SCM_UNDEFINED));";
print "\t}";
print ""; print "";
print "\tglibtop_free (ptr);"; print "\tglibtop_free (retval);\n";
print "";
print "\treturn list;";
} }
print "\treturn list;";
print "}"; print "}";
print ""; print "";
} }
/^[^#]/ { make_output($0) }
END { END {
print "void"; print "void";
print "glibtop_boot_guile (void)"; print "glibtop_boot_guile (void)";

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_guile_names.la lib_LTLIBRARIES = libgtop_guile_names.la

View File

@@ -92,7 +92,14 @@ function output(feature) {
print ""; print "";
} }
/^(\w+)/ { features[$1] = $1 } /^[^#]/ {
line = $0;
split (line, line_fields, /\|/);
feature = line_fields[2];
sub(/^@/,"",feature);
features[feature] = feature;
}
END { END {
for (feature in features) { for (feature in features) {

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la lib_LTLIBRARIES = libgtop_sysdeps.la

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la lib_LTLIBRARIES = libgtop_sysdeps.la

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_names.la lib_LTLIBRARIES = libgtop_names.la
@@ -11,5 +7,6 @@ lib_LTLIBRARIES = libgtop_names.la
libgtop_names_la_SOURCES = cpu.c mem.c swap.c uptime.c loadavg.c \ libgtop_names_la_SOURCES = cpu.c mem.c swap.c uptime.c loadavg.c \
shm_limits.c msg_limits.c sem_limits.c \ shm_limits.c msg_limits.c sem_limits.c \
proclist.c sysdeps.c procstate.c procuid.c \ proclist.c sysdeps.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \ proctime.c procmem.c procsignal.c \
procsegment.c fsusage.c prockernel.c procsegment.c fsusage.c \
mountlist.c

46
sysdeps/names/mountlist.c Normal file
View File

@@ -0,0 +1,46 @@
/* $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/mountlist.h>
const char *glibtop_names_mountlist [GLIBTOP_MAX_MOUNTLIST] =
{
"number", "total", "size"
};
const unsigned glibtop_types_mountlist [GLIBTOP_MAX_MOUNTLIST] =
{
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
};
const char *glibtop_labels_mountlist [GLIBTOP_MAX_MOUNTLIST] =
{
N_("Number of list elements"),
N_("Total size of list"),
N_("Size of a single list element")
};
const char *glibtop_descriptions_mountlist [GLIBTOP_MAX_MOUNTLIST] =
{
N_("Number of list elements"),
N_("Total size of list"),
N_("Size of a single list element")
};

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la lib_LTLIBRARIES = libgtop_sysdeps.la

View File

@@ -1,9 +1,5 @@
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
CFLAGS = -Wall -W @CFLAGS@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la