Lines Matching full:dictionary
28 #include "dictionary.h"
32 @brief Get number of sections in a dictionary
33 @param d Dictionary to examine
34 @return int Number of sections found in dictionary
36 This function returns the number of sections found in a dictionary.
38 dictionary: a section name is given as "section" whereas a key is
49 int iniparser_getnsec(dictionary * d);
54 @brief Get name for section n in a dictionary.
55 @param d Dictionary to examine
59 This function locates the n-th section in a dictionary and returns
61 dictionary. Do not free or modify the returned string!
67 char * iniparser_getsecname(dictionary * d, int n);
72 @brief Save a dictionary to a loadable ini file
73 @param d Dictionary to dump
77 This function dumps a given dictionary into a loadable ini file.
82 void iniparser_dump_ini(dictionary * d, FILE * f);
86 @brief Save a dictionary section to a loadable ini file
87 @param d Dictionary to dump
88 @param s Section name of dictionary to dump
92 This function dumps a given section of a given dictionary into a loadable ini
97 void iniparser_dumpsection_ini(dictionary * d, char * s, FILE * f);
101 @brief Dump a dictionary to an opened file pointer.
102 @param d Dictionary to dump.
106 This function prints out the contents of a dictionary, one element by
112 void iniparser_dump(dictionary * d, FILE * f);
116 @brief Get the number of keys in a section of a dictionary.
117 @param d Dictionary to examine
118 @param s Section name of dictionary to examine
122 int iniparser_getsecnkeys(dictionary * d, char * s);
126 @brief Get the number of keys in a section of a dictionary.
127 @param d Dictionary to examine
128 @param s Section name of dictionary to examine
131 This function queries a dictionary and finds all keys in a given section.
133 a string allocated in the dictionary; do not free or modify them.
138 char ** iniparser_getseckeys(dictionary * d, char * s);
143 @param d Dictionary to search
148 This function queries a dictionary for a key. A key as read from an
152 the dictionary, do not free or modify it.
155 char * iniparser_getstring(dictionary * d, const char * key, char * def);
160 @param d Dictionary to search
165 This function queries a dictionary for a key. A key as read from an
184 int iniparser_getint(dictionary * d, const char * key, int notfound);
189 @param d Dictionary to search
194 This function queries a dictionary for a key. A key as read from an
199 double iniparser_getdouble(dictionary * d, const char * key, double notfound);
204 @param d Dictionary to search
209 This function queries a dictionary for a key. A key as read from an
233 int iniparser_getboolean(dictionary * d, const char * key, int notfound);
238 @brief Set an entry in a dictionary.
239 @param ini Dictionary to modify.
244 If the given entry can be found in the dictionary, it is modified to
249 int iniparser_set(dictionary * ini, const char * entry, const char * val);
254 @brief Delete an entry in a dictionary
255 @param ini Dictionary to modify
259 If the given entry can be found, it is deleted from the dictionary.
262 void iniparser_unset(dictionary * ini, const char * entry);
266 @brief Finds out if a given entry exists in a dictionary
267 @param ini Dictionary to search
271 Finds out if a given entry exists in the dictionary. Since sections
273 of querying for the presence of sections in a dictionary.
276 int iniparser_find_entry(dictionary * ini, const char * entry) ;
280 @brief Parse an ini file and return an allocated dictionary object
282 @return Pointer to newly allocated dictionary
285 the name of the file to be read. It returns a dictionary object that
289 The returned dictionary must be freed using iniparser_freedict().
292 dictionary * iniparser_load(const char * ininame);
296 @brief Free all memory associated to an ini dictionary
297 @param d Dictionary to free
300 Free all memory associated to an ini dictionary.
301 It is mandatory to call this function before the dictionary object
305 void iniparser_freedict(dictionary * d);