diff options
author | epochqwert <epoch@hacking.allowed.org> | 2015-03-31 13:38:31 -0500 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2015-03-31 13:38:31 -0500 |
commit | 3b1466afd58e7cfbf5be09df8cfc52409171f5d3 (patch) | |
tree | 83ff40686c230866ac8c245366cacf4c9ed019cf /libhashtable/example.c | |
parent | 7f43ddc3b96848b1a788a86ae663279dead86f27 (diff) | |
download | segfault-3b1466afd58e7cfbf5be09df8cfc52409171f5d3.tar.gz segfault-3b1466afd58e7cfbf5be09df8cfc52409171f5d3.zip |
moved libhashtable and libirc into their own repos.
Diffstat (limited to 'libhashtable/example.c')
-rw-r--r-- | libhashtable/example.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/libhashtable/example.c b/libhashtable/example.c deleted file mode 100644 index 919d75c..0000000 --- a/libhashtable/example.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <stdio.h> -#include "hashtable.h" - -extern char **environ; - -int main(int argc,char *argv[]) { - struct hashtable ht; - int i; - char *name; - char *value; - inittable(&ht,65535); - for(i=0;environ[i];i++) { - name=strdup(environ[i]); - if((value=strchr(name,'=') )){ - *value=0; - value++; - } - ht_setkey(&ht,name,value); - free(name); - } - printf("PATH='%s'\n",ht_getvalue(&ht,"PATH")); - //if you want to get a whole entry struct use ht_getnode(); - //getentry() just returns the first struct in the linked list in that bucket. - return 0; -} |