|
|
|
|
@ -50,8 +50,7 @@ extern "C" { |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
|
|
|
|
|
int iniparser_getnsec(const dictionary * d); |
|
|
|
|
|
|
|
|
|
int iniparser_getnsec(const dictionary *d); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -68,8 +67,7 @@ int iniparser_getnsec(const dictionary * d); |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
|
|
|
|
|
const char * iniparser_getsecname(const dictionary * d, int n); |
|
|
|
|
|
|
|
|
|
const char *iniparser_getsecname(const dictionary *d, int n); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -83,7 +81,7 @@ const char * iniparser_getsecname(const dictionary * d, int n); |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
|
|
|
|
|
void iniparser_dump_ini(const dictionary * d, FILE * f); |
|
|
|
|
void iniparser_dump_ini(const dictionary *d, FILE *f); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -98,7 +96,7 @@ void iniparser_dump_ini(const dictionary * d, FILE * f); |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
|
|
|
|
|
void iniparser_dumpsection_ini(const dictionary * d, const char * s, FILE * f); |
|
|
|
|
void iniparser_dumpsection_ini(const dictionary *d, const char *s, FILE *f); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -113,7 +111,7 @@ void iniparser_dumpsection_ini(const dictionary * d, const char * s, FILE * f); |
|
|
|
|
purposes mostly. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
void iniparser_dump(const dictionary * d, FILE * f); |
|
|
|
|
void iniparser_dump(const dictionary *d, FILE *f); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -123,7 +121,7 @@ void iniparser_dump(const dictionary * d, FILE * f); |
|
|
|
|
@return Number of keys in section |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
int iniparser_getsecnkeys(const dictionary * d, const char * s); |
|
|
|
|
int iniparser_getsecnkeys(const dictionary *d, const char *s); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -141,8 +139,7 @@ int iniparser_getsecnkeys(const dictionary * d, const char * s); |
|
|
|
|
a string allocated in the dictionary; do not free or modify them. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
const char ** iniparser_getseckeys(const dictionary * d, const char * s, const char ** keys); |
|
|
|
|
|
|
|
|
|
const char **iniparser_getseckeys(const dictionary *d, const char *s, const char **keys); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -159,7 +156,7 @@ const char ** iniparser_getseckeys(const dictionary * d, const char * s, const c |
|
|
|
|
the dictionary, do not free or modify it. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
const char * iniparser_getstring(const dictionary * d, const char * key, const char * def); |
|
|
|
|
const char *iniparser_getstring(const dictionary *d, const char *key, const char *def); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -188,7 +185,7 @@ const char * iniparser_getstring(const dictionary * d, const char * key, const c |
|
|
|
|
Credits: Thanks to A. Becker for suggesting strtol() |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
int iniparser_getint(const dictionary * d, const char * key, int notfound); |
|
|
|
|
int iniparser_getint(const dictionary *d, const char *key, int notfound); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -203,7 +200,7 @@ int iniparser_getint(const dictionary * d, const char * key, int notfound); |
|
|
|
|
the notfound value is returned. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
double iniparser_getdouble(const dictionary * d, const char * key, double notfound); |
|
|
|
|
double iniparser_getdouble(const dictionary *d, const char *key, double notfound); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -237,8 +234,7 @@ double iniparser_getdouble(const dictionary * d, const char * key, double notfou |
|
|
|
|
necessarily have to be 0 or 1. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
int iniparser_getboolean(const dictionary * d, const char * key, int notfound); |
|
|
|
|
|
|
|
|
|
int iniparser_getboolean(const dictionary *d, const char *key, int notfound); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -253,8 +249,7 @@ int iniparser_getboolean(const dictionary * d, const char * key, int notfound); |
|
|
|
|
It is Ok to set val to NULL. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
int iniparser_set(dictionary * ini, const char * entry, const char * val); |
|
|
|
|
|
|
|
|
|
int iniparser_set(dictionary *ini, const char *entry, const char *val); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -266,7 +261,7 @@ int iniparser_set(dictionary * ini, const char * entry, const char * val); |
|
|
|
|
If the given entry can be found, it is deleted from the dictionary. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
void iniparser_unset(dictionary * ini, const char * entry); |
|
|
|
|
void iniparser_unset(dictionary *ini, const char *entry); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -280,7 +275,7 @@ void iniparser_unset(dictionary * ini, const char * entry); |
|
|
|
|
of querying for the presence of sections in a dictionary. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
int iniparser_find_entry(const dictionary * ini, const char * entry) ; |
|
|
|
|
int iniparser_find_entry(const dictionary *ini, const char *entry); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -296,7 +291,7 @@ int iniparser_find_entry(const dictionary * ini, const char * entry) ; |
|
|
|
|
The returned dictionary must be freed using iniparser_freedict(). |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
dictionary * iniparser_load(const char * ininame); |
|
|
|
|
dictionary *iniparser_load(const char *ininame); |
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/ |
|
|
|
|
/**
|
|
|
|
|
@ -309,7 +304,7 @@ dictionary * iniparser_load(const char * ininame); |
|
|
|
|
gets out of the current context. |
|
|
|
|
*/ |
|
|
|
|
/*--------------------------------------------------------------------------*/ |
|
|
|
|
void iniparser_freedict(dictionary * d); |
|
|
|
|
void iniparser_freedict(dictionary *d); |
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
} |
|
|
|
|
|