Lines Matching refs:dictionary

43 #include "dictionary.h"
63 @brief Get number of sections in a dictionary
65 @return int Number of sections found in dictionary
67 This function returns the number of sections found in a dictionary.
69 dictionary: a section name is given as "section" whereas a key is
80 int iniparser_getnsec(const dictionary * d);
85 @brief Get name for section n in a dictionary.
90 This function locates the n-th section in a dictionary and returns
92 dictionary. Do not free or modify the returned string!
98 const char * iniparser_getsecname(const dictionary * d, int n);
103 @brief Save a dictionary to a loadable ini file
108 This function dumps a given dictionary into a loadable ini file.
113 void iniparser_dump_ini(const dictionary * d, FILE * f);
117 @brief Save a dictionary section to a loadable ini file
119 @param s Section name of dictionary to dump
123 This function dumps a given section of a given dictionary into a loadable ini
128 void iniparser_dumpsection_ini(const dictionary * d, const char * s, FILE * f);
132 @brief Dump a dictionary to an opened file pointer.
137 This function prints out the contents of a dictionary, one element by
143 void iniparser_dump(const dictionary * d, FILE * f);
147 @brief Get the number of keys in a section of a dictionary.
149 @param s Section name of dictionary to examine
153 int iniparser_getsecnkeys(const dictionary * d, const char * s);
157 @brief Get the number of keys in a section of a dictionary.
159 @param s Section name of dictionary to examine
163 This function queries a dictionary and finds all keys in a given section.
168 a string allocated in the dictionary; do not free or modify them.
171 const char ** iniparser_getseckeys(const dictionary * d, const char * s, const char ** keys);
182 This function queries a dictionary for a key. A key as read from an
186 the dictionary, do not free or modify it.
189 const char * iniparser_getstring(const dictionary * d, const char * key, const char * def);
199 This function queries a dictionary for a key. A key as read from an
218 int iniparser_getint(const dictionary * d, const char * key, int notfound);
228 This function queries a dictionary for a key. A key as read from an
245 long int iniparser_getlongint(const dictionary * d, const char * key, long int notfound);
256 This function queries a dictionary for a key. A key as read from an
261 double iniparser_getdouble(const dictionary * d, const char * key, double notfound);
271 This function queries a dictionary for a key. A key as read from an
295 int iniparser_getboolean(const dictionary * d, const char * key, int notfound);
300 @brief Set an entry in a dictionary.
306 If the given entry can be found in the dictionary, it is modified to
311 int iniparser_set(dictionary * ini, const char * entry, const char * val);
316 @brief Delete an entry in a dictionary
321 If the given entry can be found, it is deleted from the dictionary.
324 void iniparser_unset(dictionary * ini, const char * entry);
328 @brief Finds out if a given entry exists in a dictionary
333 Finds out if a given entry exists in the dictionary. Since sections
335 of querying for the presence of sections in a dictionary.
338 int iniparser_find_entry(const dictionary * ini, const char * entry) ;
342 @brief Parse an ini file and return an allocated dictionary object
344 @return Pointer to newly allocated dictionary
347 the name of the file to be read. It returns a dictionary object that
351 The returned dictionary must be freed using iniparser_freedict().
354 dictionary * iniparser_load(const char * ininame);
358 @brief Free all memory associated to an ini dictionary
362 Free all memory associated to an ini dictionary.
363 It is mandatory to call this function before the dictionary object
367 void iniparser_freedict(dictionary * d);