aboutsummaryrefslogtreecommitdiffstats
path: root/hash.h
diff options
context:
space:
mode:
authorreinelt <>2004-01-18 09:01:45 +0000
committerreinelt <>2004-01-18 09:01:45 +0000
commit6c86643d7e174294488e42c5f0404f5a6244668f (patch)
tree28db6924b1f974ac99a8d5a67fecae8a8cbc325a /hash.h
parent9fdad968332d4a70090cf813f0620e3c5d66a0ef (diff)
downloadlcd4linux-6c86643d7e174294488e42c5f0404f5a6244668f.tar.gz
[lcd4linux @ 2004-01-18 09:01:45 by reinelt]
/proc/stat parsing finished
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h40
1 files changed, 23 insertions, 17 deletions
diff --git a/hash.h b/hash.h
index 7ab1634..f29ccdb 100644
--- a/hash.h
+++ b/hash.h
@@ -1,4 +1,4 @@
-/* $Id: hash.h,v 1.4 2004/01/16 11:12:26 reinelt Exp $
+/* $Id: hash.h,v 1.5 2004/01/18 09:01:45 reinelt Exp $
*
* hashes (associative arrays)
*
@@ -23,6 +23,9 @@
*
*
* $Log: hash.h,v $
+ * Revision 1.5 2004/01/18 09:01:45 reinelt
+ * /proc/stat parsing finished
+ *
* Revision 1.4 2004/01/16 11:12:26 reinelt
* some bugs in plugin_xmms fixed, parsing moved to own function
* plugin_proc_stat nearly finished
@@ -46,9 +49,21 @@
#ifndef _HASH_H_
#define _HASH_H_
+
+// struct timeval
+#include <sys/time.h>
+
+
typedef struct {
- char *key;
- char *val;
+ struct timeval time;
+ double val;
+} HASH_SLOT;
+
+
+typedef struct {
+ char *key;
+ char *val;
+ HASH_SLOT *Slot;
} HASH_ITEM;
@@ -59,19 +74,10 @@ typedef struct {
} HASH;
-typedef struct {
- // struct timeval time;
- double val;
-} FILTER_SLOT;
-
-typedef struct {
- char *key;
- int nSlots;
- FILTER_SLOT *Slots;
-} FILTER_ITEM;
-
-void hash_set (HASH *Hash, char *key, char *val);
-char *hash_get (HASH *Hash, char *key);
-void hash_destroy (HASH *Hash);
+void hash_set (HASH *Hash, char *key, char *val);
+void hash_set_filter (HASH *Hash, char *key, char *val);
+char *hash_get (HASH *Hash, char *key);
+double hash_get_filter (HASH *Hash, char *key, int delay);
+void hash_destroy (HASH *Hash);
#endif