summaryrefslogtreecommitdiff
path: root/sysdeps/linux/glibtop_server.h
diff options
context:
space:
mode:
authorMartin Baulig <martin@src.gnome.org>1998-08-16 13:37:14 +0000
committerMartin Baulig <martin@src.gnome.org>1998-08-16 13:37:14 +0000
commit36657db9409c20cbfa650f0a356194aea574eeae (patch)
treebd15559289bf31cad0e1587f85d870432c9bbb65 /sysdeps/linux/glibtop_server.h
parent486cc220c43de57f3d9b380b62a5bc94950750e1 (diff)
downloadlibgtop-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.h18
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