version 1.100, 2014/04/23 19:08:52 |
version 1.101, 2014/04/23 21:06:33 |
|
|
* manpath_parse() wants to do it. |
* manpath_parse() wants to do it. |
*/ |
*/ |
if (argc > 0) { |
if (argc > 0) { |
dirs.paths = mandoc_calloc(argc, |
dirs.paths = mandoc_reallocarray(NULL, |
sizeof(char *)); |
argc, sizeof(char *)); |
dirs.sz = (size_t)argc; |
dirs.sz = (size_t)argc; |
for (i = 0; i < argc; i++) |
for (i = 0; i < argc; i++) |
dirs.paths[i] = mandoc_strdup(argv[i]); |
dirs.paths[i] = mandoc_strdup(argv[i]); |
|
|
s->mask |= v; |
s->mask |= v; |
return; |
return; |
} else if (NULL == s) { |
} else if (NULL == s) { |
s = mandoc_calloc(sizeof(struct str) + sz + 1, 1); |
s = mandoc_calloc(1, sizeof(struct str) + sz + 1); |
memcpy(s->key, cp, sz); |
memcpy(s->key, cp, sz); |
ohash_insert(htab, slot, s); |
ohash_insert(htab, slot, s); |
} |
} |
|
|
hash_halloc(size_t sz, void *arg) |
hash_halloc(size_t sz, void *arg) |
{ |
{ |
|
|
return(mandoc_calloc(sz, 1)); |
return(mandoc_calloc(1, sz)); |
} |
} |
|
|
static void * |
static void * |