-
-/*
- * The `Nm' macro's first use sets the name of the document. See also
- * post_std(), etc.
- */
-static int
-post_nm(POST_ARGS)
-{
- char buf[BUFSIZ];
-
- if (m->meta.name)
- return(1);
- if ( ! concat(m, buf, n->child, BUFSIZ))
- return(0);
- m->meta.name = mandoc_strdup(buf);
- return(1);
-}
-
-
-/*
- * Look up the value of `Lb' for matching predefined strings. If it has
- * one, then substitute the current value for the formatted value. Note
- * that the lookup may fail (we can provide arbitrary strings).
- */
-/* ARGSUSED */
-static int
-post_lb(POST_ARGS)
-{
- const char *p;
- char *buf;
- size_t sz;
-
- assert(MDOC_TEXT == n->child->type);
- p = mdoc_a2lib(n->child->string);
-
- if (p) {
- free(n->child->string);
- n->child->string = mandoc_strdup(p);
- return(1);
- }
-
- sz = strlen(n->child->string) +
- 2 + strlen("\\(lqlibrary\\(rq");
- buf = mandoc_malloc(sz);
- snprintf(buf, sz, "library \\(lq%s\\(rq", n->child->string);
- free(n->child->string);
- n->child->string = buf;
- return(1);
-}
-
-
-/*
- * Substitute the value of `St' for the corresponding formatted string.
- * We're guaranteed that this exists (it's been verified during the
- * validation phase).
- */
-/* ARGSUSED */
-static int
-post_st(POST_ARGS)
-{
- const char *p;
-
- assert(MDOC_TEXT == n->child->type);
- p = mdoc_a2st(n->child->string);
- if (p != NULL) {
- free(n->child->string);
- n->child->string = mandoc_strdup(p);
- }
- return(1);
-}
-
-