diff options
author | Martin Baulig <martin@src.gnome.org> | 1998-08-16 13:37:14 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1998-08-16 13:37:14 +0000 |
commit | 36657db9409c20cbfa650f0a356194aea574eeae (patch) | |
tree | bd15559289bf31cad0e1587f85d870432c9bbb65 /sysdeps/linux/glibtop_server.h | |
parent | 486cc220c43de57f3d9b380b62a5bc94950750e1 (diff) | |
download | libgtop-36657db9409c20cbfa650f0a356194aea574eeae.tar.gz |
Major code cleanups, we now use open () and read ().
Diffstat (limited to 'sysdeps/linux/glibtop_server.h')
-rw-r--r-- | sysdeps/linux/glibtop_server.h | 18 |
1 files changed, 18 insertions, 0 deletions
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 <fcntl.h> +#include <ctype.h> + __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 |