X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fq.h;h=3834e1126b1098f0050cb72c6c9a76303021ca1c;hb=b981dc70e7f97f7462a9bcfac0e3ad33ce70b512;hp=942bf286a0a3e6163247c8c75aa27a99da48fb74;hpb=ddf646ca8e7a6f30ed99c144b46483199cfb8e8f;p=swftools.git diff --git a/lib/q.h b/lib/q.h index 942bf28..3834e11 100644 --- a/lib/q.h +++ b/lib/q.h @@ -120,6 +120,12 @@ typedef struct _heap int(*compare)(const void *, const void *); } heap_t; +typedef struct _trie { + struct _trie*row[256]; + unsigned char*rest; +} trie_t; + + char* strdup_n(const char*str, int size); unsigned int crc32_add_byte(unsigned int crc32, unsigned char b); @@ -201,6 +207,9 @@ void* heap_chopmax(heap_t*h); void heap_dump(heap_t*h, FILE*fi); void** heap_flatten(heap_t*h); +void trie_put(trie_t**t, unsigned const char*id); +int trie_lookup(trie_t*t, unsigned const char*id); + array_t* array_new(); array_t* array_new2(type_t*type); void array_free(array_t*array);