version 1.12, 2013/11/21 01:49:18 |
version 1.16, 2014/08/10 23:54:41 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
#include "config.h" |
#endif |
|
|
|
|
#include <sys/types.h> |
|
|
#include <assert.h> |
#include <assert.h> |
#include <ctype.h> |
#include <ctype.h> |
#include <limits.h> |
#include <limits.h> |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
#include "mandoc.h" |
#include "mandoc_aux.h" |
#include "manpath.h" |
#include "manpath.h" |
|
|
#define MAN_CONF_FILE "/etc/man.conf" |
#define MAN_CONF_FILE "/etc/man.conf" |
Line 169 manpath_add(struct manpaths *dirs, const char *dir) |
|
Line 169 manpath_add(struct manpaths *dirs, const char *dir) |
|
if (0 == strcmp(dirs->paths[i], dir)) |
if (0 == strcmp(dirs->paths[i], dir)) |
return; |
return; |
|
|
dirs->paths = mandoc_realloc |
dirs->paths = mandoc_reallocarray(dirs->paths, |
(dirs->paths, |
dirs->sz + 1, sizeof(char *)); |
(dirs->sz + 1) * sizeof(char *)); |
|
|
|
dirs->paths[dirs->sz++] = mandoc_strdup(cp); |
dirs->paths[dirs->sz++] = mandoc_strdup(cp); |
} |
} |