diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-01 10:21:25 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-01 10:21:25 +0000 |
commit | 2ed73f15f397931a1f753d3402a929bf8fc03a36 (patch) | |
tree | 122ca9911c8ba1dfee0724cd09abc53f3321ffc0 | |
parent | 3b60a6aee09a6a6d6d71ca3fef995ce03f1082e1 (diff) | |
download | mandoc-2ed73f15f397931a1f753d3402a929bf8fc03a36.tar.gz |
Low-hanging fruit: add OpenBSD's `ad', `hy', `ne', and `nh' handling.
Rename roff_line() -> roff_line_ignore().
-rw-r--r-- | roff.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -45,6 +45,7 @@ #endif enum rofft { + ROFF_ad, ROFF_am, ROFF_ami, ROFF_am1, @@ -53,9 +54,12 @@ enum rofft { ROFF_de1, ROFF_ds, ROFF_el, + ROFF_hy, ROFF_ie, ROFF_if, ROFF_ig, + ROFF_ne, + ROFF_nh, ROFF_rm, ROFF_tr, ROFF_cblock, @@ -130,7 +134,7 @@ static enum roffrule roff_evalcond(const char *, int *); static void roff_freestr(struct roff *); static const char *roff_getstrn(const struct roff *, const char *, size_t); -static enum rofferr roff_line(ROFF_ARGS); +static enum rofferr roff_line_ignore(ROFF_ARGS); static enum rofferr roff_nr(ROFF_ARGS); static int roff_res(struct roff *, char **, size_t *, int); @@ -147,6 +151,7 @@ static char *roff_strdup(const char *); static struct roffmac *hash[HASHWIDTH]; static struct roffmac roffs[ROFF_MAX] = { + { "ad", roff_line_ignore, NULL, NULL, 0, NULL }, { "am", roff_block, roff_block_text, roff_block_sub, 0, NULL }, { "ami", roff_block, roff_block_text, roff_block_sub, 0, NULL }, { "am1", roff_block, roff_block_text, roff_block_sub, 0, NULL }, @@ -155,11 +160,14 @@ static struct roffmac roffs[ROFF_MAX] = { { "de1", roff_block, roff_block_text, roff_block_sub, 0, NULL }, { "ds", roff_ds, NULL, NULL, 0, NULL }, { "el", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT, NULL }, + { "hy", roff_line_ignore, NULL, NULL, 0, NULL }, { "ie", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT, NULL }, { "if", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT, NULL }, { "ig", roff_block, roff_block_text, roff_block_sub, 0, NULL }, - { "rm", roff_line, NULL, NULL, 0, NULL }, - { "tr", roff_line, NULL, NULL, 0, NULL }, + { "ne", roff_line_ignore, NULL, NULL, 0, NULL }, + { "nh", roff_line_ignore, NULL, NULL, 0, NULL }, + { "rm", roff_line_ignore, NULL, NULL, 0, NULL }, + { "tr", roff_line_ignore, NULL, NULL, 0, NULL }, { ".", roff_cblock, NULL, NULL, 0, NULL }, { "\\}", roff_ccond, NULL, NULL, 0, NULL }, { "nr", roff_nr, NULL, NULL, 0, NULL }, @@ -841,7 +849,7 @@ roff_evalcond(const char *v, int *pos) /* ARGSUSED */ static enum rofferr -roff_line(ROFF_ARGS) +roff_line_ignore(ROFF_ARGS) { return(ROFF_IGN); |