struct logline *hashtable = NULL; void analyze(struct logline *line) { struct logline *s = NULL; if (strstr(line->request,"liveinternet.ru")) { HASH_FIND(hh, hashtable, &(line->userid),sizeof(long int), s); if (s == NULL) { HASH_ADD(hh, hashtable, userid, sizeof(long int), line); } } } int getresult(void){ struct logline *s; int count = 0; for (s=hashtable; s != NULL; s=s->hh.next) { count++; }; return count; };