#ifndef UCX_PROPERTIES_H
#define UCX_PROPERTIES_H
#include "ucx.h"
#include "map.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,
sstr_t *name,
sstr_t *value);
int ucx_properties2map(UcxProperties *prop, UcxMap *map);
int ucx_properties_load(UcxMap *map,
FILE *file);
int ucx_properties_store(UcxMap *map,
FILE *file);
#ifdef __cplusplus
}
#endif
#endif