version 1.18, 2014/11/18 19:41:47 |
version 1.21, 2015/03/22 18:14:30 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2011, 2014 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2011, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
Line 80 manpath_parse(struct manpaths *dirs, const char *file, |
|
Line 80 manpath_parse(struct manpaths *dirs, const char *file, |
|
if ( ! ferror(stream) && feof(stream) && |
if ( ! ferror(stream) && feof(stream) && |
bsz && '\n' == buf[bsz - 1]) { |
bsz && '\n' == buf[bsz - 1]) { |
buf[bsz - 1] = '\0'; |
buf[bsz - 1] = '\0'; |
manpath_parseline(dirs, buf); |
manpath_parseline(dirs, buf, 1); |
} |
} |
|
|
free(buf); |
free(buf); |
pclose(stream); |
pclose(stream); |
#else |
#else |
|
char manpath_default[] = MANPATH_DEFAULT; |
char *insert; |
char *insert; |
|
|
/* Always prepend -m. */ |
/* Always prepend -m. */ |
Line 105 manpath_parse(struct manpaths *dirs, const char *file, |
|
Line 106 manpath_parse(struct manpaths *dirs, const char *file, |
|
/* No MANPATH; use man.conf(5) only. */ |
/* No MANPATH; use man.conf(5) only. */ |
if (NULL == defp || '\0' == defp[0]) { |
if (NULL == defp || '\0' == defp[0]) { |
manpath_manconf(dirs, file); |
manpath_manconf(dirs, file); |
|
if (dirs->sz == 0) |
|
manpath_parseline(dirs, manpath_default, 0); |
return; |
return; |
} |
} |
|
|