Exemple #1
0
inline static parse_ini_t
local_getIni(const char *fname)
{
	parse_ini_t ini;

	if ((fname == NULL) || (fname[0] == '\0'))
		ini = parse_ini_open(IO_PARAMETER_FNAME);
	else
		ini = parse_ini_open(fname);

	if (ini == NULL) {
		fprintf(stderr,
		        "FATAL: Could not open parameter file (%s)\n",
		        ((fname == NULL) ? IO_PARAMETER_FNAME : fname));
		return NULL;
	}

	return ini;
}
Exemple #2
0
static makeMask_t
local_getMama(void)
{
	parse_ini_t ini;
	makeMask_t  mama;

	ini = parse_ini_open(localIniFileName);
	if (ini == NULL) {
		fprintf(stderr, "FATAL:  Could not open %s for reading.\n",
		        localIniFileName);
		exit(EXIT_FAILURE);
	}

	mama = makeMask_newFromIni(ini, localSectionName);

	parse_ini_close(&ini);

	return mama;
}