source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Minimal implementation of .EX and .EE for GNU compatibility.
@ 2012-06-02 20:16 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2012-06-02 20:16 UTC (permalink / raw)
  To: source

Log Message:
-----------
Minimal implementation of .EX and .EE for GNU compatibility.
Do not use this, it is not portable and only defined in esr's man-ext.
For example, sox(1) wants these macros.

Modified Files:
--------------
    mdocml:
        man.7
        man.c
        man.h
        man_html.c
        man_macro.c
        man_term.c
        man_validate.c

Revision Data
-------------
Index: man.7
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.7,v
retrieving revision 1.115
retrieving revision 1.116
diff -Lman.7 -Lman.7 -u -p -r1.115 -r1.116
--- man.7
+++ man.7
@@ -339,6 +339,18 @@ and
 .Ss \&DT
 Has no effect.
 Included for compatibility.
+.Ss \&EE
+This is a non-standard GNU extension, included only for compatibility.
+In
+.Xr mandoc 1 ,
+it does the same as
+.Sx \&fi .
+.Ss \&EX
+This is a non-standard GNU extension, included only for compatibility.
+In
+.Xr mandoc 1 ,
+it does the same as
+.Sx \&nf .
 .Ss \&HP
 Begin a paragraph whose initial output line is left-justified, but
 subsequent output lines are indented, with the following syntax:
Index: man_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_term.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -Lman_term.c -Lman_term.c -u -p -r1.128 -r1.129
--- man_term.c
+++ man_term.c
@@ -127,6 +127,8 @@ static	const struct termact termacts[MAN
 	{ pre_in, NULL, MAN_NOTEXT }, /* in */
 	{ pre_ft, NULL, MAN_NOTEXT }, /* ft */
 	{ pre_OP, NULL, 0 }, /* OP */
+	{ pre_literal, NULL, 0 }, /* EX */
+	{ pre_literal, NULL, 0 }, /* EE */
 };
 
 
@@ -243,7 +245,7 @@ pre_literal(DECL_ARGS)
 
 	term_newln(p);
 
-	if (MAN_nf == n->tok)
+	if (MAN_nf == n->tok || MAN_EX == n->tok)
 		mt->fl |= MANT_LITERAL;
 	else
 		mt->fl &= ~MANT_LITERAL;
Index: man_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_html.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -Lman_html.c -Lman_html.c -u -p -r1.87 -r1.88
--- man_html.c
+++ man_html.c
@@ -113,6 +113,8 @@ static	const struct htmlman mans[MAN_MAX
 	{ man_in_pre, NULL }, /* in */
 	{ man_ign_pre, NULL }, /* ft */
 	{ man_OP_pre, NULL }, /* OP */
+	{ man_literal_pre, NULL }, /* EX */
+	{ man_literal_pre, NULL }, /* EE */
 };
 
 /*
@@ -638,7 +640,7 @@ static int
 man_literal_pre(MAN_ARGS)
 {
 
-	if (MAN_nf != n->tok) {
+	if (MAN_fi == n->tok || MAN_EE == n->tok) {
 		print_otag(h, TAG_BR, 0, NULL);
 		mh->fl &= ~MANH_LITERAL;
 	} else
Index: man.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -Lman.h -Lman.h -u -p -r1.60 -r1.61
--- man.h
+++ man.h
@@ -52,6 +52,8 @@ enum	mant {
 	MAN_in,
 	MAN_ft,
 	MAN_OP,
+	MAN_EX,
+	MAN_EE,
 	MAN_MAX
 };
 
Index: man.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -Lman.c -Lman.c -u -p -r1.115 -r1.116
--- man.c
+++ man.c
@@ -40,7 +40,7 @@ const	char *const __man_macronames[MAN_M
 	"RI",		"na",		"sp",		"nf",
 	"fi",		"RE",		"RS",		"DT",
 	"UC",		"PD",		"AT",		"in",
-	"ft",		"OP"
+	"ft",		"OP",		"EX",		"EE"
 	};
 
 const	char * const *man_macronames = __man_macronames;
Index: man_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_validate.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -Lman_validate.c -Lman_validate.c -u -p -r1.80 -r1.81
--- man_validate.c
+++ man_validate.c
@@ -114,6 +114,8 @@ static	const struct man_valid man_valids
 	{ NULL, NULL }, /* in */
 	{ NULL, posts_ft }, /* ft */
 	{ NULL, posts_eq2 }, /* OP */
+	{ NULL, posts_nf }, /* EX */
+	{ NULL, posts_fi }, /* EE */
 };
 
 
Index: man_macro.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_macro.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -Lman_macro.c -Lman_macro.c -u -p -r1.71 -r1.72
--- man_macro.c
+++ man_macro.c
@@ -85,6 +85,8 @@ const	struct man_macro __man_macros[MAN_
 	{ in_line_eoln, 0 }, /* in */
 	{ in_line_eoln, 0 }, /* ft */
 	{ in_line_eoln, 0 }, /* OP */
+	{ in_line_eoln, MAN_BSCOPE }, /* EX */
+	{ in_line_eoln, MAN_BSCOPE }, /* EE */
 };
 
 const	struct man_macro * const man_macros = __man_macros;
--
 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:[~2012-06-02 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-02 20:16 mdocml: Minimal implementation of .EX and .EE for GNU compatibility schwarze

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).