ucx/properties.h

changeset 109
75cb6590358b
parent 108
d2b1e67b2b48
child 110
1cf71e56f01e
equal deleted inserted replaced
108:d2b1e67b2b48 109:75cb6590358b
41 size_t buflen; 41 size_t buflen;
42 size_t pos; 42 size_t pos;
43 char *tmp; 43 char *tmp;
44 size_t tmplen; 44 size_t tmplen;
45 size_t tmpcap; 45 size_t tmpcap;
46 int error;
46 char delimiter; 47 char delimiter;
47 char comment1; 48 char comment1;
48 char comment2; 49 char comment2;
49 char comment3; 50 char comment3;
50 } UcxPropParser; 51 } UcxPropParser;
52 53
53 UcxPropParser *ucx_prop_new(); 54 UcxPropParser *ucx_prop_new();
54 void ucx_prop_free(UcxPropParser *parser); 55 void ucx_prop_free(UcxPropParser *parser);
55 void ucx_prop_fill(UcxPropParser *parser, char *buf, size_t len); 56 void ucx_prop_fill(UcxPropParser *parser, char *buf, size_t len);
56 int ucx_prop_parse(UcxPropParser *parser, sstr_t *name, sstr_t *value); 57 int ucx_prop_parse(UcxPropParser *parser, sstr_t *name, sstr_t *value);
58 int ucx_prop_parse2map(UcxPropParser *parser, UcxMap *map);
59
60 int ucx_properties_load(UcxMap *map, FILE *file);
61 int ucx_properties_store(UcxMap *map, FILE *file);
57 62
58 #ifdef __cplusplus 63 #ifdef __cplusplus
59 } 64 }
60 #endif 65 #endif
61 66

mercurial