summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-05-24 22:25:58 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-05-24 22:25:58 +0000
commit30f1b0c604238c5d864f10e3595ce8e10f23ceea (patch)
treec5ac084b41701a965412316a9c503d664a6cd93e /roff.c
parente4081855b3ccc752fd8d5c743e87ad84478c748c (diff)
downloadmandoc-30f1b0c604238c5d864f10e3595ce8e10f23ceea.tar.gz
provide stubs to ignore .ds, .rm and .tr,
which occur in the standard pod2man preamble; from OpenBSD; "sounds good" joerg@, "can be checked in" kristaps@
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/roff.c b/roff.c
index cb0c85d9..17099449 100644
--- a/roff.c
+++ b/roff.c
@@ -38,10 +38,13 @@ enum rofft {
ROFF_de,
ROFF_dei,
ROFF_de1,
+ ROFF_ds,
ROFF_el,
ROFF_ie,
ROFF_if,
ROFF_ig,
+ ROFF_rm,
+ ROFF_tr,
ROFF_cblock,
ROFF_ccond,
ROFF_MAX
@@ -98,6 +101,7 @@ static enum rofferr roff_ccond(ROFF_ARGS);
static enum rofferr roff_cond(ROFF_ARGS);
static enum rofferr roff_cond_text(ROFF_ARGS);
static enum rofferr roff_cond_sub(ROFF_ARGS);
+static enum rofferr roff_line(ROFF_ARGS);
const struct roffmac roffs[ROFF_MAX] = {
{ "am", roff_block, roff_block_text, roff_block_sub, 0 },
@@ -106,10 +110,13 @@ const struct roffmac roffs[ROFF_MAX] = {
{ "de", roff_block, roff_block_text, roff_block_sub, 0 },
{ "dei", roff_block, roff_block_text, roff_block_sub, 0 },
{ "de1", roff_block, roff_block_text, roff_block_sub, 0 },
+ { "ds", roff_line, NULL, NULL, 0 },
{ "el", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT },
{ "ie", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT },
{ "if", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT },
{ "ig", roff_block, roff_block_text, roff_block_sub, 0 },
+ { "rm", roff_line, NULL, NULL, 0 },
+ { "tr", roff_line, NULL, NULL, 0 },
{ ".", roff_cblock, NULL, NULL, 0 },
{ "\\}", roff_ccond, NULL, NULL, 0 },
};
@@ -703,3 +710,12 @@ roff_cond(ROFF_ARGS)
*offs = pos;
return(ROFF_RERUN);
}
+
+
+/* ARGSUSED */
+static enum rofferr
+roff_line(ROFF_ARGS)
+{
+
+ return(ROFF_IGN);
+}