version 1.29, 2015/11/07 17:58:55 |
version 1.30, 2016/05/28 13:44:13 |
Line 224 manconf_file(struct manconf *conf, const char *file) |
|
Line 224 manconf_file(struct manconf *conf, const char *file) |
|
|
|
while ((linelen = getline(&line, &linesz, stream)) != -1) { |
while ((linelen = getline(&line, &linesz, stream)) != -1) { |
cp = line; |
cp = line; |
ep = cp + linelen; |
ep = cp + linelen - 1; |
if (ep[-1] != '\n') |
while (ep > cp && isspace((unsigned char)*ep)) |
break; |
*ep-- = '\0'; |
*--ep = '\0'; |
|
while (isspace((unsigned char)*cp)) |
while (isspace((unsigned char)*cp)) |
cp++; |
cp++; |
if (*cp == '#') |
if (cp == ep || *cp == '#') |
continue; |
continue; |
|
|
for (tok = 0; tok < sizeof(toks)/sizeof(toks[0]); tok++) { |
for (tok = 0; tok < sizeof(toks)/sizeof(toks[0]); tok++) { |