diff -r 7f90a03e186e -r ff3dd1ee7dee ucx/map.h --- a/ucx/map.h Thu Oct 04 14:08:31 2012 +0200 +++ b/ucx/map.h Thu Oct 04 16:03:18 2012 +0200 @@ -14,7 +14,7 @@ #endif #define UCX_MAP_FOREACH(elm,iter) \ - for(elm;ucx_map_iter_next(&iter,(void*)&elm)==0;) + for(;ucx_map_iter_next(&iter,(void*)&elm)==0;) typedef struct UcxMap UcxMap; typedef struct UcxKey UcxKey; @@ -64,6 +64,15 @@ int ucx_map_iter_next(UcxMapIterator *i, void **elm); +/* use for string maps only, values are not encoded */ +int ucx_map_load(UcxMap *map, FILE *f); +int ucx_map_store(UcxMap *map, FILE *f); + +/* TODO: +int ucx_map_load_enc(UcxMap *map, FILE *f, copy_func decoder, void* decdata); +int ucx_map_store_enc(UcxMap *map, FILE *f, copy_func encoder, void* encdata); + */ + #ifdef __cplusplus } #endif