1.1 --- a/ucx/properties.h Wed Aug 14 16:07:49 2013 +0200 1.2 +++ b/ucx/properties.h Fri Aug 16 13:40:10 2013 +0200 1.3 @@ -56,52 +56,62 @@ 1.4 * Automatically set by calls to ucx_properties_fill(). 1.5 */ 1.6 char *buffer; 1.7 + 1.8 /** 1.9 * Length of the input buffer (don't set manually). 1.10 * Automatically set by calls to ucx_properties_fill(). 1.11 */ 1.12 size_t buflen; 1.13 + 1.14 /** 1.15 * Current buffer position (don't set manually). 1.16 * Used by ucx_properties_next(). 1.17 */ 1.18 size_t pos; 1.19 + 1.20 /** 1.21 * Internal temporary buffer (don't set manually). 1.22 * Used by ucx_properties_next(). 1.23 */ 1.24 char *tmp; 1.25 + 1.26 /** 1.27 * Internal temporary buffer length (don't set manually). 1.28 * Used by ucx_properties_next(). 1.29 */ 1.30 size_t tmplen; 1.31 + 1.32 /** 1.33 * Internal temporary buffer capacity (don't set manually). 1.34 * Used by ucx_properties_next(). 1.35 */ 1.36 size_t tmpcap; 1.37 + 1.38 /** 1.39 * Parser error code. 1.40 * This is always 0 on success and a nonzero value on syntax errors. 1.41 * The value is set by ucx_properties_next(). 1.42 */ 1.43 int error; 1.44 + 1.45 /** 1.46 * The delimiter that shall be used. 1.47 * This is '=' by default. 1.48 */ 1.49 char delimiter; 1.50 + 1.51 /** 1.52 * The first comment character. 1.53 * This is '#' by default. 1.54 */ 1.55 char comment1; 1.56 + 1.57 /** 1.58 * The second comment character. 1.59 * This is not set by default. 1.60 */ 1.61 char comment2; 1.62 + 1.63 /** 1.64 * The third comment character. 1.65 * This is not set by default. 1.66 @@ -115,11 +125,13 @@ 1.67 * @return a pointer to the new UcxProperties object 1.68 */ 1.69 UcxProperties *ucx_properties_new(); 1.70 + 1.71 /** 1.72 * Destroys an UcxProperties object. 1.73 * @param prop the UcxProperties object to destroy 1.74 */ 1.75 void ucx_properties_free(UcxProperties *prop); 1.76 + 1.77 /** 1.78 * Sets the input buffer for the properties parser. 1.79 * 1.80 @@ -136,6 +148,7 @@ 1.81 * @see ucx_properties2map() 1.82 */ 1.83 void ucx_properties_fill(UcxProperties *prop, char *buf, size_t len); 1.84 + 1.85 /** 1.86 * Retrieves the next key/value-pair. 1.87 * 1.88 @@ -155,6 +168,7 @@ 1.89 * @see ucx_properties_fill() 1.90 */ 1.91 int ucx_properties_next(UcxProperties *prop, sstr_t *name, sstr_t *value); 1.92 + 1.93 /** 1.94 * Retrieves all available key/value-pairs and puts them into an UcxMap. 1.95 * 1.96 @@ -184,6 +198,7 @@ 1.97 * @see ucx_properties2map() 1.98 */ 1.99 int ucx_properties_load(UcxMap *map, FILE *file); 1.100 + 1.101 /** 1.102 * Stores an UcxMap to a file. 1.103 *