From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Strangely, ignoring the roff(7) .na request was implemented in
Date: Fri, 23 Jan 2015 21:42:19 -0500 (EST) [thread overview]
Message-ID: <10485548787424985140.enqueue@fantadrom.bsd.lv> (raw)
Log Message:
-----------
Strangely, ignoring the roff(7) .na request was implemented in the man(7)
parser. Simplify the code by moving it into the roff(7) parser, also
making it work for mdoc(7).
Modified Files:
--------------
mdocml:
man.7
man.c
man.h
man_html.c
man_macro.c
man_term.c
man_validate.c
roff.c
Revision Data
-------------
Index: man_term.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_term.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -Lman_term.c -Lman_term.c -u -p -r1.165 -r1.166
--- man_term.c
+++ man_term.c
@@ -114,7 +114,6 @@ static const struct termact termacts[MAN
{ pre_I, NULL, 0 }, /* I */
{ pre_alternate, NULL, 0 }, /* IR */
{ pre_alternate, NULL, 0 }, /* RI */
- { pre_ign, NULL, MAN_NOTEXT }, /* na */
{ pre_sp, NULL, MAN_NOTEXT }, /* sp */
{ pre_literal, NULL, 0 }, /* nf */
{ pre_literal, NULL, 0 }, /* fi */
Index: roff.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/roff.c,v
retrieving revision 1.255
retrieving revision 1.256
diff -Lroff.c -Lroff.c -u -p -r1.255 -r1.256
--- roff.c
+++ roff.c
@@ -179,7 +179,7 @@ enum rofft {
ROFF_minss,
ROFF_mk,
ROFF_mso,
- /* MAN_na; ignored in mdoc(7) */
+ ROFF_na,
ROFF_ne,
/* MAN_nf; ignored in mdoc(7) */
ROFF_nh,
@@ -580,6 +580,7 @@ static struct roffmac roffs[ROFF_MAX] =
{ "minss", roff_line_ignore, NULL, NULL, 0, NULL },
{ "mk", roff_line_ignore, NULL, NULL, 0, NULL },
{ "mso", roff_insec, NULL, NULL, 0, NULL },
+ { "na", roff_line_ignore, NULL, NULL, 0, NULL },
{ "ne", roff_line_ignore, NULL, NULL, 0, NULL },
{ "nh", roff_line_ignore, NULL, NULL, 0, NULL },
{ "nhychar", roff_line_ignore, NULL, NULL, 0, NULL },
Index: man_macro.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_macro.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -Lman_macro.c -Lman_macro.c -u -p -r1.93 -r1.94
--- man_macro.c
+++ man_macro.c
@@ -72,7 +72,6 @@ const struct man_macro __man_macros[MAN_
{ in_line_eoln, MAN_SCOPED | MAN_JOIN }, /* I */
{ in_line_eoln, 0 }, /* IR */
{ in_line_eoln, 0 }, /* RI */
- { in_line_eoln, MAN_NSCOPED }, /* na */
{ in_line_eoln, MAN_NSCOPED }, /* sp */
{ in_line_eoln, MAN_BSCOPE }, /* nf */
{ in_line_eoln, MAN_BSCOPE }, /* fi */
Index: man.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -Lman.c -Lman.c -u -p -r1.147 -r1.148
--- man.c
+++ man.c
@@ -39,7 +39,7 @@ const char *const __man_macronames[MAN_M
"IP", "HP", "SM", "SB",
"BI", "IB", "BR", "RB",
"R", "B", "I", "IR",
- "RI", "na", "sp", "nf",
+ "RI", "sp", "nf",
"fi", "RE", "RS", "DT",
"UC", "PD", "AT", "in",
"ft", "OP", "EX", "EE",
Index: man.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man.h,v
retrieving revision 1.68
retrieving revision 1.69
diff -Lman.h -Lman.h -u -p -r1.68 -r1.69
--- man.h
+++ man.h
@@ -38,7 +38,6 @@ enum mant {
MAN_I,
MAN_IR,
MAN_RI,
- MAN_na,
MAN_sp,
MAN_nf,
MAN_fi,
Index: man.7
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man.7,v
retrieving revision 1.130
retrieving revision 1.131
diff -Lman.7 -Lman.7 -u -p -r1.130 -r1.131
--- man.7
+++ man.7
@@ -727,8 +727,6 @@ If
is signed, the new offset is relative.
Otherwise, it is absolute.
This value is reset upon the next paragraph, section, or sub-section.
-.Ss \&na
-Don't align to the right margin.
.Ss \&nf
Begin literal mode: all subsequent free-form lines have their end of
line boundaries preserved.
@@ -780,10 +778,9 @@ is equivalent to
If next-line macros are invoked consecutively, only the last is used.
If a next-line macro is followed by a non-next-line macro, an error is
raised, except for
-.Sx \&br ,
-.Sx \&sp ,
+.Sx \&br
and
-.Sx \&na .
+.Sx \&sp .
.Pp
The syntax is as follows:
.Bd -literal -offset indent
@@ -814,7 +811,6 @@ The syntax is as follows:
.It Sx \&br Ta 0 Ta current Ta compat
.It Sx \&fi Ta 0 Ta current Ta compat
.It Sx \&in Ta 1 Ta current Ta compat
-.It Sx \&na Ta 0 Ta current Ta compat
.It Sx \&nf Ta 0 Ta current Ta compat
.It Sx \&sp Ta 1 Ta current Ta compat
.El
Index: man_validate.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_validate.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -Lman_validate.c -Lman_validate.c -u -p -r1.108 -r1.109
--- man_validate.c
+++ man_validate.c
@@ -79,7 +79,6 @@ static v_check man_valids[MAN_MAX] = {
NULL, /* I */
NULL, /* IR */
NULL, /* RI */
- check_eq0, /* na */
post_vs, /* sp */
post_nf, /* nf */
post_fi, /* fi */
Index: man_html.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_html.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -Lman_html.c -Lman_html.c -u -p -r1.108 -r1.109
--- man_html.c
+++ man_html.c
@@ -100,7 +100,6 @@ static const struct htmlman mans[MAN_MAX
{ man_I_pre, NULL }, /* I */
{ man_alt_pre, NULL }, /* IR */
{ man_alt_pre, NULL }, /* RI */
- { man_ign_pre, NULL }, /* na */
{ man_br_pre, NULL }, /* sp */
{ man_literal_pre, NULL }, /* nf */
{ man_literal_pre, NULL }, /* fi */
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2015-01-24 2:42 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=10485548787424985140.enqueue@fantadrom.bsd.lv \
--to=schwarze@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).