#ifndef UCX_PROPERTIES_H
#define UCX_PROPERTIES_H
#include <cx/hash_map.h>
#include <cx/string.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
char *buffer;
size_t buflen;
size_t pos;
char *tmp;
size_t tmplen;
size_t tmpcap;
int error;
char delimiter;
char comment1;
char comment2;
char comment3;
} UcxProperties;
UcxProperties *ucx_properties_new();
void ucx_properties_free(UcxProperties *prop);
void ucx_properties_fill(UcxProperties *prop, char *buf, size_t len);
int ucx_properties_next(UcxProperties *prop, cxstring *name, cxstring *value);
int ucx_properties2map(UcxProperties *prop, CxMap *map);
int ucx_properties_load(CxMap *map, FILE *file);
int ucx_properties_store(CxMap *map, FILE *file);
#ifdef __cplusplus
}
#endif
#endif