* mdocml: Low-hanging fruit: add OpenBSD's `ad', `hy', `ne', and `nh'
@ 2010-12-01 10:21 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-12-01 10:21 UTC (permalink / raw)
To: source
Log Message:
-----------
Low-hanging fruit: add OpenBSD's `ad', `hy', `ne', and `nh' handling.
Rename roff_line() -> roff_line_ignore().
Modified Files:
--------------
mdocml:
roff.c
Revision Data
-------------
Index: roff.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -Lroff.c -Lroff.c -u -p -r1.102 -r1.103
--- roff.c
+++ roff.c
@@ -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(cons
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);
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-12-01 10:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01 10:21 mdocml: Low-hanging fruit: add OpenBSD's `ad', `hy', `ne', and `nh' kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).