From 36657db9409c20cbfa650f0a356194aea574eeae Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 16 Aug 1998 13:37:14 +0000 Subject: Major code cleanups, we now use open () and read (). --- sysdeps/linux/glibtop_server.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sysdeps/linux/glibtop_server.h') diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h index 23664c12..2d3abe49 100644 --- a/sysdeps/linux/glibtop_server.h +++ b/sysdeps/linux/glibtop_server.h @@ -22,8 +22,26 @@ #ifndef __GLIBTOP_SERVER_H__ #define __GLIBTOP_SERVER_H__ +#include +#include + __BEGIN_DECLS +static inline char * +skip_token (const char *p) +{ + while (isspace(*p)) p++; + while (*p && !isspace(*p)) p++; + return (char *)p; +} + +static inline char * +skip_line (const char *p) +{ + while (*p != '\n') p++; + return (char *) p++; +} + #define GLIBTOP_SUID_CPU 0 #define GLIBTOP_SUID_MEM 0 #define GLIBTOP_SUID_SWAP 0 -- cgit v1.2.1