Loading...
Searching...
No Matches
ciniparser.h File Reference
Ciniparser | Internal API

Parser for ini files. More...

`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include "dictionary.h"`

Go to the source code of this file.

## Macros

#define | ciniparser_getstr(d, k)
#define | ciniparser_setstr ciniparser_setstring

## Functions

int | ciniparser_getnsec (dictionary *d)
| Get number of sections in a dictionary.
const char * | ciniparser_getsecname (dictionary *d, int n)
| Get name for section n in a dictionary.
void | ciniparser_dump_ini (dictionary *d, FILE *f)
| Save a dictionary to a loadable ini file.
void | ciniparser_dump (dictionary *d, FILE *f)
| Dump a dictionary to an opened file pointer.
const char * | ciniparser_getstring (dictionary *d, const char *key, char *def)
| Get the string associated to a key.
int | ciniparser_getint (dictionary *d, const char *key, int notfound)
| Get the string associated to a key, convert to an int.
double | ciniparser_getdouble (dictionary *d, const char *key, double notfound)
| Get the string associated to a key, convert to a double.
int | ciniparser_getboolean (dictionary *d, const char *key, int notfound)
| Get the string associated to a key, convert to a boolean.
int | ciniparser_setstring (dictionary *ini, char const *entry, const char *val)
| Set an entry in a dictionary.
void | ciniparser_unset (dictionary *ini, char *entry)
| Delete an entry in a dictionary.
int | ciniparser_find_entry (dictionary *ini, const char *entry)
| Finds out if a given entry exists in a dictionary.
dictionary * | ciniparser_load (const char *ininame)
| Parse an ini file and return an allocated dictionary object.
void | ciniparser_freedict (dictionary *d)
| Free all memory associated to an ini dictionary.
int | ciniparser_set (dictionary *d, const char *entry, const char *val)
| Set an item in the dictionary.

## Detailed Description

Parser for ini files.

Author
  N. Devillard

Date
  Sep 2007

Version
  3.0

Definition in file ciniparser.h.