mirror of
https://github.com/akheron/jansson.git
synced 2025-04-06 05:55:05 +00:00
expect "export" in test configs
This commit is contained in:
parent
dcaa90d21e
commit
face43929d
1 changed files with 3 additions and 4 deletions
|
@ -86,8 +86,9 @@ static void read_conf(FILE *conffile)
|
|||
char *buffer, *line, *val;
|
||||
|
||||
buffer = loadfile(conffile);
|
||||
line = strtok(buffer, "\r\n");
|
||||
while (line) {
|
||||
for (line = strtok(buffer, "\r\n"); line; line = strtok(NULL, "\r\n")) {
|
||||
if (!strncmp(line, "export ", 7))
|
||||
continue;
|
||||
val = strchr(line, '=');
|
||||
if (!val) {
|
||||
printf("invalid configuration line\n");
|
||||
|
@ -107,8 +108,6 @@ static void read_conf(FILE *conffile)
|
|||
conf.sort_keys = atoi(val);
|
||||
if (!strcmp(line, "STRIP"))
|
||||
conf.strip = atoi(val);
|
||||
|
||||
line = strtok(NULL, "\r\n");
|
||||
}
|
||||
|
||||
free(buffer);
|
||||
|
|
Loading…
Add table
Reference in a new issue