netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
iniparser_util.h File Reference
#include <iniparser.h>

Go to the source code of this file.

Macros

#define INISEC_GLOBAL   "global"
#define INISEC_HOMES   "homes"
#define INIPARSER_GETSTR(config, section, key, default)
#define INIPARSER_GETSTRDUP(config, section, key, default)
#define CONFIG_ARG_FREE(a)

Macro Definition Documentation

◆ CONFIG_ARG_FREE

#define CONFIG_ARG_FREE ( a)
Value:
do { \
free(a); \
a = NULL; \
} while (0);

◆ INIPARSER_GETSTR

#define INIPARSER_GETSTR ( config,
section,
key,
default )
Value:
({ \
char _option[MAXOPTLEN]; \
snprintf(_option, sizeof(_option), "%s:%s", section, key); \
iniparser_getstring(config, _option, default); \
})
#define MAXOPTLEN
Definition globals.h:48
#define key
Definition hash.c:36

◆ INIPARSER_GETSTRDUP

#define INIPARSER_GETSTRDUP ( config,
section,
key,
default )
Value:
({ \
char _option[MAXOPTLEN]; \
snprintf(_option, sizeof(_option), "%s:%s", section, key); \
const char *_tmp = iniparser_getstring(config, _option, default); \
_tmp ? strdup(_tmp) : NULL; \
})

◆ INISEC_GLOBAL

#define INISEC_GLOBAL   "global"

◆ INISEC_HOMES

#define INISEC_HOMES   "homes"