From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Low-hanging fruit: add OpenBSD's `ad', `hy', `ne', and `nh'
Date: Wed, 1 Dec 2010 05:21:26 -0500 (EST) [thread overview]
Message-ID: <201012011021.oB1ALQ5b018776@krisdoz.my.domain> (raw)
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
reply other threads:[~2010-12-01 10:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201012011021.oB1ALQ5b018776@krisdoz.my.domain \
--to=kristaps@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).