diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-23 14:22:11 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-23 14:22:11 +0000 |
commit | dc4e5ca1c9fd9bd34e243dcdb884af02102c9389 (patch) | |
tree | 78f2d3ac00100e778e6832933da1ace2dab9e080 /action.c | |
parent | d4dba4479e3ed55fdc52b75eab00afe7ad78d5f0 (diff) | |
download | mandoc-dc4e5ca1c9fd9bd34e243dcdb884af02102c9389.tar.gz |
First addition of -man macro support.
Abstraction of mdoc.
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -24,7 +24,7 @@ #include <stdlib.h> #include <string.h> -#include "private.h" +#include "libmdoc.h" /* * Actions are executed on macros after they've been post-validated: in @@ -272,7 +272,10 @@ post_std(POST_ARGS) assert(m->meta.name); - m->last->args->argv[0].value = xcalloc(1, sizeof(char *)); + m->last->args->argv[0].value = calloc(1, sizeof(char *)); + if (NULL == m->last->args->argv[0].value) + err(1, "calloc"); + m->last->args->argv[0].sz = 1; m->last->args->argv[0].value[0] = xstrdup(m->meta.name); return(1); @@ -493,7 +496,9 @@ post_bl_tagwidth(struct mdoc *m) n->args->argv[n->args->argc - 1].line = m->last->line; n->args->argv[n->args->argc - 1].pos = m->last->pos; n->args->argv[n->args->argc - 1].sz = 1; - n->args->argv[n->args->argc - 1].value = xcalloc(1, sizeof(char *)); + n->args->argv[n->args->argc - 1].value = calloc(1, sizeof(char *)); + if (NULL == n->args->argv[n->args->argc - 1].value) + err(1, "calloc"); n->args->argv[n->args->argc - 1].value[0] = xstrdup(buf); return(1); |