From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Collapse `nf', `fi', `Vb', and `Ve' into one function as in
Date: Fri, 23 Jul 2010 09:22:35 -0400 (EDT) [thread overview]
Message-ID: <201007231322.o6NDMZbb027290@krisdoz.my.domain> (raw)
Log Message:
-----------
Collapse `nf', `fi', `Vb', and `Ve' into one function as in man_html.c.
Modified Files:
--------------
mdocml:
man_term.c
Revision Data
-------------
Index: man_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_term.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -Lman_term.c -Lman_term.c -u -p -r1.83 -r1.84
--- man_term.c
+++ man_term.c
@@ -92,10 +92,9 @@ static int pre_RS(DECL_ARGS);
static int pre_SH(DECL_ARGS);
static int pre_SS(DECL_ARGS);
static int pre_TP(DECL_ARGS);
-static int pre_fi(DECL_ARGS);
static int pre_ign(DECL_ARGS);
static int pre_in(DECL_ARGS);
-static int pre_nf(DECL_ARGS);
+static int pre_literal(DECL_ARGS);
static int pre_sp(DECL_ARGS);
static void post_IP(DECL_ARGS);
@@ -130,8 +129,8 @@ static const struct termact termacts[MAN
{ NULL, NULL, MAN_NOTEXT }, /* na */
{ pre_I, NULL, 0 }, /* i */
{ pre_sp, NULL, MAN_NOTEXT }, /* sp */
- { pre_nf, NULL, 0 }, /* nf */
- { pre_fi, NULL, 0 }, /* fi */
+ { pre_literal, NULL, 0 }, /* nf */
+ { pre_literal, NULL, 0 }, /* fi */
{ NULL, NULL, 0 }, /* r */
{ NULL, NULL, 0 }, /* RE */
{ pre_RS, post_RS, 0 }, /* RS */
@@ -139,8 +138,8 @@ static const struct termact termacts[MAN
{ pre_ign, NULL, 0 }, /* UC */
{ pre_ign, NULL, 0 }, /* PD */
{ pre_sp, NULL, MAN_NOTEXT }, /* Sp */
- { pre_nf, NULL, 0 }, /* Vb */
- { pre_fi, NULL, 0 }, /* Ve */
+ { pre_literal, NULL, 0 }, /* Vb */
+ { pre_literal, NULL, 0 }, /* Ve */
{ pre_ign, NULL, 0 }, /* AT */
{ pre_in, NULL, MAN_NOTEXT }, /* in */
};
@@ -250,24 +249,24 @@ pre_I(DECL_ARGS)
/* ARGSUSED */
static int
-pre_fi(DECL_ARGS)
+pre_literal(DECL_ARGS)
{
term_newln(p);
- mt->fl &= ~MANT_LITERAL;
+ switch (n->tok) {
+ case (MAN_Vb):
+ /* FALLTHROUGH */
+ case (MAN_nf):
+ mt->fl |= MANT_LITERAL;
+ return(MAN_Vb != n->tok);
+ default:
+ mt->fl &= ~MANT_LITERAL;
+ break;
+ }
+
return(1);
}
-
-/* ARGSUSED */
-static int
-pre_nf(DECL_ARGS)
-{
-
- term_newln(p);
- mt->fl |= MANT_LITERAL;
- return(MAN_Vb != n->tok);
-}
/* ARGSUSED */
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2010-07-23 13:22 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=201007231322.o6NDMZbb027290@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).