aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-11-30 20:53:34 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-11-30 20:53:34 +0000
commit5fe81f4208926eadeabb2221d96e8453443a3bc7 (patch)
treef4788785c711dd5f46a4eec81528517ca5bffb4f /roff.c
parent45754bdb07fd4e2554839fcdb290280bccc5f41d (diff)
downloadmandoc-5fe81f4208926eadeabb2221d96e8453443a3bc7.tar.gz
mandoc-5fe81f4208926eadeabb2221d96e8453443a3bc7.tar.zst
mandoc-5fe81f4208926eadeabb2221d96e8453443a3bc7.zip
Cleaned up presentation with mbuf_putstring & al.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/roff.c b/roff.c
index 86a5e199..fc65394a 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.22 2008/11/30 18:53:11 kristaps Exp $ */
+/* $Id: roff.c,v 1.23 2008/11/30 20:53:34 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -307,8 +307,11 @@ const char *const toknamesp[ROFF_MAX] = {
"Ic", "In", "Li", "Nd",
"Nm", "Op", "Ot", "Pa",
"Rv", "St", "Va", "Vt",
+ /* LINTED */
"Xr", "\%A", "\%B", "\%D",
+ /* LINTED */
"\%I", "\%J", "\%N", "\%O",
+ /* LINTED */
"\%P", "\%R", "\%T", "\%V",
"Ac", "Ao", "Aq", "At",
"Bc", "Bf", "Bo", "Bq",
@@ -671,7 +674,7 @@ static int
rofffindtok(const char *buf)
{
char token[4];
- size_t i;
+ int i;
for (i = 0; *buf && ! isspace(*buf) && i < 3; i++, buf++)
token[i] = *buf;
@@ -976,7 +979,7 @@ roff_layout(ROFFCALL_ARGS)
if (NULL == *argv)
return(1);
- if ( ! (*tree->cb.roffin)(tree->arg, tok, argcp, argvp))
+ if ( ! (*tree->cb.roffin)(tree->arg, tok, 0, argcp, argvp))
return(0);
if ( ! (ROFF_PARSED & tokens[tok].flags)) {
@@ -1030,6 +1033,7 @@ roff_layout(ROFFCALL_ARGS)
assert(0 != i);
i++;
+ /* LINTED */
while (argv[i])
if ( ! (*tree->cb.roffdata)(tree->arg, 0, argv[i++]))
return(0);
@@ -1071,7 +1075,7 @@ roff_text(ROFFCALL_ARGS)
argcp[i] = ROFF_ARGMAX;
argvp[i] = NULL;
- if ( ! (*tree->cb.roffin)(tree->arg, tok, argcp, argvp))
+ if ( ! (*tree->cb.roffin)(tree->arg, tok, 1, argcp, argvp))
return(0);
if ( ! (ROFF_PARSED & tokens[tok].flags)) {
@@ -1148,6 +1152,7 @@ roff_text(ROFFCALL_ARGS)
assert(0 != i);
i++;
+ /* LINTED */
while (argv[i])
if ( ! (*tree->cb.roffdata)(tree->arg, 0, argv[i++]))
return(0);