version 1.2, 2011/11/24 10:43:55 |
version 1.3, 2011/11/24 10:44:56 |
Line 123 manpath_parseconf(struct manpaths *dirs) |
|
Line 123 manpath_parseconf(struct manpaths *dirs) |
|
free(buf); |
free(buf); |
pclose(stream); |
pclose(stream); |
#else |
#else |
manpath_manconf(dirs); |
manpath_manconf(MAN_CONF_FILE, dirs); |
#endif |
#endif |
} |
} |
|
|
Line 139 manpath_free(struct manpaths *p) |
|
Line 139 manpath_free(struct manpaths *p) |
|
} |
} |
|
|
void |
void |
manpath_manconf(struct manpaths *dirs) |
manpath_manconf(const char *file, struct manpaths *dirs) |
{ |
{ |
FILE *stream; |
FILE *stream; |
char *p, *q; |
char *p, *q; |
Line 148 manpath_manconf(struct manpaths *dirs) |
|
Line 148 manpath_manconf(struct manpaths *dirs) |
|
keysz = strlen(MAN_CONF_KEY); |
keysz = strlen(MAN_CONF_KEY); |
assert(keysz > 0); |
assert(keysz > 0); |
|
|
if (NULL == (stream = fopen(MAN_CONF_FILE, "r"))) |
if (NULL == (stream = fopen(file, "r"))) |
return; |
return; |
|
|
while (NULL != (p = fgetln(stream, &len))) { |
while (NULL != (p = fgetln(stream, &len))) { |