/* hca.h Henriks Line Collector This is a demo program you may use it free as long as you keep the history header and use it on your own responsibility. It should work with both Windows and UNIX (such as Solaris & Linux). History 2014-01-25 Created by Henrik Bjorkman, www.eit.se/hb */ #ifndef SIZEOF_ARRAY #define SIZEOF_ARRAY(a) (sizeof(a)/sizeof(a[0])) #endif #define DB_SIZE 10000 typedef struct { char name[1024]; char value[1024]; } db_s; class db { public: db(); int find_free_slot(const char *name); int add_entry(const char *name, const char* value); int find_slot(const char *name); const char* get_value(const char *name); int remove_entry(const char *name); private: db_s* db_list[DB_SIZE]; int db_n; };