Posted on January 24th, 2008 by hgndgtl
The documentation discusses the aspect how to utilize the library for the first time. How to fine-tune some parameters, illustrate some basic structures and whose impact (e.g. lists, arrays ...) and last but not least, a doxygen generated documentation explain all interfaces. The document is splited in several sections:
svn co https://libhashish.svn.sourceforge.net/svnroot/libhashish libhashish
cd libhashish ./configure make make test su -c 'make install; ldconfig'
cat >/tmp/hashtest.c <<EOF #include <libhashish.h> int main(void) { hi_handle_t *hi_handle; const char *key = "23"; const char *data = "data element"; const char *data_ptr; /* initialize hashish handle */ hi_init_str(&hi_handle, 23); /* insert an key/data pair */ ret = hi_insert_str(hi_handle, key, data); /* search for a pair with a string key and store result */ hi_get_str(hi_handle, key, &data_ptr); fprintf(stdout, "Key: %s Data: %s\n", key, data_ptr); /* free the hashish handle */ hi_fini(hi_handle); return 0; } EOF
gcc -pipe -Os -Wall -W /tmp/hashtest.c -lm -lhashish -o /tmp/hashtest /tmp/hashtest