89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
char *cmd = NULL, *value = NULL, *sep = NULL, *cmdend = NULL;
char *fgetsret = NULL;
int lcpvret = -1, lpcafret = -1;
int invalid_section = 0, ignore_section = 0;
int local_lc_errline;
int retval = 0;
lc_err_t save_lc_errno = LC_ERR_NONE;
if (pathprefix != NULL) {
/* Copy the prefix, if specified. */
strncpy(qualifbuf, pathprefix, sizeof(qualifbuf) - 1);
}
local_lc_errfile = configfile;
|
>
>
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
char *cmd = NULL, *value = NULL, *sep = NULL, *cmdend = NULL;
char *fgetsret = NULL;
int lcpvret = -1, lpcafret = -1;
int invalid_section = 0, ignore_section = 0;
int local_lc_errline;
int retval = 0;
lc_err_t save_lc_errno = LC_ERR_NONE;
char *local_lc_errfile;
int local_lc_errline;
if (pathprefix != NULL) {
/* Copy the prefix, if specified. */
strncpy(qualifbuf, pathprefix, sizeof(qualifbuf) - 1);
}
local_lc_errfile = configfile;
|
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
lc_errno = LC_ERR_NONE;
lcpvret = lc_process_var(qualifbuf, NULL, value, LC_FLAGS_VAR);
if (lcpvret < 0) {
if (lc_errno == LC_ERR_NONE) {
#ifdef DEBUG
fprintf(stderr, "Invalid command: \"%s\"\n", cmd);
#endif
lc_errno = LC_ERR_INVCMD;
} else {
#ifdef DEBUG
fprintf(stderr, "Error processing command (command was valid, but an error occured, errno was set)\n");
#endif
}
lc_errfile = local_lc_errfile;
|
>
>
|
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
|
lc_errno = LC_ERR_NONE;
lcpvret = lc_process_var(qualifbuf, NULL, value, LC_FLAGS_VAR);
if (lcpvret < 0) {
if (lc_errno == LC_ERR_NONE) {
#ifdef DEBUG
fprintf(stderr, "Invalid command: \"%s\"\n", cmd);
#endif
lc_errfile = local_lc_errfile;
lc_errline = local_lc_errline;
lc_errno = LC_ERR_INVCMD;
} else {
#ifdef DEBUG
fprintf(stderr, "Error processing command (command was valid, but an error occured, errno was set)\n");
#endif
}
lc_errfile = local_lc_errfile;
|