Mercurial > repos > blastem
diff tern.h @ 766:1b2f8280ba81
WIP changes to support reading cart memory map from ROM DB
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 05 Jul 2015 14:21:34 -0700 |
parents | de6f00204fa2 |
children | 2f48a3c187c6 |
line wrap: on
line diff
--- a/tern.h Thu Jul 02 20:43:01 2015 -0700 +++ b/tern.h Sun Jul 05 14:21:34 2015 -0700 @@ -25,6 +25,8 @@ char el; } tern_node; +typedef void (*iter_fun)(char *key, tern_val val, void *data); + tern_node * tern_insert(tern_node * head, char * key, tern_val value); int tern_find(tern_node * head, char * key, tern_val *ret); tern_node * tern_find_prefix(tern_node * head, char * key); @@ -32,7 +34,12 @@ tern_node * tern_insert_int(tern_node * head, char * key, intptr_t value); void * tern_find_ptr_default(tern_node * head, char * key, void * def); void * tern_find_ptr(tern_node * head, char * key); +tern_val tern_find_path_default(tern_node *head, char *key, tern_val def); +tern_val tern_find_path(tern_node *head, char *key); tern_node * tern_insert_ptr(tern_node * head, char * key, void * value); +tern_node * tern_insert_node(tern_node *head, char *key, tern_node *value); +uint32_t tern_count(tern_node *head); char * tern_int_key(uint32_t key, char * buf); +tern_node * tern_get_node(tern_val value); #endif //TERN_H_