summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-26 16:23:22 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-26 16:23:22 +0000
commitbd329dd8fae21fc03372e563b33ef77a421e7ea9 (patch)
tree33fe05e6ba7ea5759d5c284f383db7440fc2f362 /mdoc_term.c
parent463a2b842f830d918f58b4a9f04bdc8af8421a18 (diff)
downloadmandoc-bd329dd8fae21fc03372e563b33ef77a421e7ea9.tar.gz
mandoc-bd329dd8fae21fc03372e563b33ef77a421e7ea9.tar.zst
mandoc-bd329dd8fae21fc03372e563b33ef77a421e7ea9.zip
All macro-invocations, for consistency, begin with `.' in documentation.
Fixed \\ -> \e in manual documentation. All preliminary -man macros in place.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index ad0e3b2f..9b40a4ca 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.2 2009/03/26 14:44:41 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.3 2009/03/26 16:23:22 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
@@ -321,11 +321,11 @@ static int arg_listtype(const struct mdoc_node *);
static int fmt_block_vspace(struct termp *,
const struct mdoc_node *,
const struct mdoc_node *);
-static int print_node(DECL_ARGS);
-static int print_head(struct termp *,
+static void print_node(DECL_ARGS);
+static void print_head(struct termp *,
const struct mdoc_meta *);
-static int print_body(DECL_ARGS);
-static int print_foot(struct termp *,
+static void print_body(DECL_ARGS);
+static void print_foot(struct termp *,
const struct mdoc_meta *);
static void sanity(const struct mdoc_node *);
@@ -334,27 +334,25 @@ int
mdoc_run(struct termp *p, const struct mdoc *m)
{
- if ( ! print_head(p, mdoc_meta(m)))
- return(0);
- if ( ! print_body(p, NULL, mdoc_meta(m), mdoc_node(m)))
- return(0);
- return(print_foot(p, mdoc_meta(m)));
+ print_head(p, mdoc_meta(m));
+ print_body(p, NULL, mdoc_meta(m), mdoc_node(m));
+ print_foot(p, mdoc_meta(m));
+ return(1);
}
-static int
+static void
print_body(DECL_ARGS)
{
- if ( ! print_node(p, pair, meta, node))
- return(0);
+ print_node(p, pair, meta, node);
if ( ! node->next)
- return(1);
- return(print_body(p, pair, meta, node->next));
+ return;
+ print_body(p, pair, meta, node->next);
}
-static int
+static void
print_node(DECL_ARGS)
{
int dochild;
@@ -396,12 +394,10 @@ print_node(DECL_ARGS)
if (MDOC_TEXT != node->type)
if (termacts[node->tok].post)
(*termacts[node->tok].post)(p, &npair, meta, node);
-
- return(1);
}
-static int
+static void
print_foot(struct termp *p, const struct mdoc_meta *meta)
{
struct tm *tm;
@@ -449,12 +445,10 @@ print_foot(struct termp *p, const struct mdoc_meta *meta)
free(buf);
free(os);
-
- return(1);
}
-static int
+static void
print_head(struct termp *p, const struct mdoc_meta *meta)
{
char *buf, *title;
@@ -520,8 +514,6 @@ print_head(struct termp *p, const struct mdoc_meta *meta)
free(title);
free(buf);
-
- return(1);
}