aboutsummaryrefslogtreecommitdiffstats
path: root/hash.h
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-18 09:01:45 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-18 09:01:45 +0000
commitdab42916caf4aa7950c01f5d3c298ea274d466d1 (patch)
tree28db6924b1f974ac99a8d5a67fecae8a8cbc325a /hash.h
parentbe7822ae1c0d3dd37cb371ec030defef0cb739ba (diff)
downloadlcd4linux-dab42916caf4aa7950c01f5d3c298ea274d466d1.tar.gz
[lcd4linux @ 2004-01-18 09:01:45 by reinelt]
/proc/stat parsing finished git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@319 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
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