source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Fixed `Lb' to be in_line (reported by Ulrich Spoerlein).
@ 2010-05-26  9:35 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-05-26  9:35 UTC (permalink / raw)
  To: source

Log Message:
-----------
Fixed `Lb' to be in_line (reported by Ulrich Spoerlein).

Added `Lb' documentation to mdoc.7.

Removed harmless but superfluous pre_lb check (was just NULL entries).

Added regressions for `Lb' (NOTE that these will only run on new groff,
as old groff doesn't support `Lb' at all).

Modified Files:
--------------
    mdocml:
        mdoc.7
        mdoc.c
        mdoc_macro.c
        mdoc_validate.c

Added Files:
-----------
    mdocml/regress/mdoc/Lb:
        blank.in
        body.in
        custom.in
        prolog.in

Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.82 -r1.83
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -138,7 +138,6 @@ static	v_pre	 pres_er[] = { NULL, NULL }
 static	v_pre	 pres_ex[] = { NULL, NULL };
 static	v_pre	 pres_fd[] = { NULL, NULL };
 static	v_pre	 pres_it[] = { pre_it, NULL };
-static	v_pre	 pres_lb[] = { NULL, NULL };
 static	v_pre	 pres_os[] = { pre_os, NULL };
 static	v_pre	 pres_rv[] = { pre_rv, NULL };
 static	v_pre	 pres_sh[] = { pre_sh, NULL };
@@ -251,7 +250,7 @@ const	struct valids mdoc_valids[MDOC_MAX
 	{ NULL, NULL },				/* Hf */
 	{ NULL, NULL },				/* Fr */
 	{ NULL, posts_notext },			/* Ud */
-	{ pres_lb, posts_lb },			/* Lb */
+	{ NULL, posts_lb },			/* Lb */
 	{ NULL, posts_notext },			/* Lp */ 
 	{ NULL, posts_text },			/* Lk */ 
 	{ NULL, posts_text },			/* Mt */ 
Index: mdoc_macro.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_macro.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.68 -r1.69
--- mdoc_macro.c
+++ mdoc_macro.c
@@ -171,7 +171,7 @@ const	struct mdoc_macro __mdoc_macros[MD
 	{ in_line_eoln, 0 }, /* Hf */
 	{ obsolete, 0 }, /* Fr */
 	{ in_line_eoln, 0 }, /* Ud */
-	{ in_line_eoln, 0 }, /* Lb */
+	{ in_line, 0 }, /* Lb */
 	{ in_line_eoln, 0 }, /* Lp */ 
 	{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Lk */ 
 	{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Mt */ 
Index: mdoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -Lmdoc.c -Lmdoc.c -u -p -r1.138 -r1.139
--- mdoc.c
+++ mdoc.c
@@ -560,6 +560,8 @@ mdoc_ptext(struct mdoc *m, int line, cha
 	 * Search for the beginning of unescaped trailing whitespace (ws)
 	 * and for the first character not to be output (end).
 	 */
+
+	/* FIXME: replace with strcspn(). */
 	ws = NULL;
 	for (c = end = buf + offs; *c; c++) {
 		switch (*c) {
Index: mdoc.7
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.7,v
retrieving revision 1.108
retrieving revision 1.109
diff -Lmdoc.7 -Lmdoc.7 -u -p -r1.108 -r1.109
--- mdoc.7
+++ mdoc.7
@@ -731,7 +731,9 @@ Note that the
 macro is a
 .Sx Block partial-implicit
 only when invoked as the first macro
-in a SYNOPSIS section line, else it is
+in a
+.Em SYNOPSIS
+section line, else it is
 .Sx In-line .
 .Ss In-line
 Closed by
@@ -1644,6 +1646,28 @@ and
 .Ss \&In
 .Ss \&It
 .Ss \&Lb
+Specify a library.
+The calling syntax is as follows:
+.Pp
+.D1 \. Ns Sx \&Lb Cm library
+.Pp
+The
+.Cm library
+parameter may be a system library, such as
+.Cm libz
+or
+.Cm libpam ,
+in which case a small library description is printed next to the linker
+invocation; or a custom library, in which case the library name is
+printed in quotes.
+This is most commonly used in the
+.Em SYNOPSIS
+section as described in
+.Sx MANUAL STRUCTURE .
+.Pp
+Examples:
+.D1 \&.Lb libz
+.D1 \&.Lb mdoc
 .Ss \&Li
 .Ss \&Lk
 Format a hyperlink.
--- /dev/null
+++ regress/mdoc/Lb/body.in
@@ -0,0 +1,17 @@
+.\"
+.\" WARNING: THIS TEST WILL NOT WORK ON OLD GROFF.
+.\" (IT DOES NOT SUPPORT THE `Lb' MACRO.)
+.\"
+.Dd $Mdocdate: May 26 2010 $
+.Dt FOO 1
+.Os
+.Sh NAME
+.Nm foo
+.Nd bar
+.Sh DESCRIPTION
+has been optimized for use by applications expecting system scope thread
+semantics, and can provide significant performance improvements
+compared to
+.Lb libkse .
+.Sh SEE ALSO
+.Xr pthread 3
--- /dev/null
+++ regress/mdoc/Lb/prolog.in
@@ -0,0 +1,19 @@
+.\"
+.\" WARNING: THIS TEST WILL NOT WORK ON OLD GROFF.
+.\" (IT DOES NOT SUPPORT THE `Lb' MACRO.)
+.\"
+.Dd $Mdocdate: May 26 2010 $
+.Dt FOO 1
+.Os
+.Sh NAME
+.Nm foo
+.Nd bar
+.Sh LIBRARY
+.Lb libz
+.Sh DESCRIPTION
+has been optimized for use by applications expecting system scope thread
+semantics, and can provide significant performance improvements
+compared to
+.Lb libkse .
+.Sh SEE ALSO
+.Xr pthread 3
--- /dev/null
+++ regress/mdoc/Lb/blank.in
@@ -0,0 +1,19 @@
+.\"
+.\" WARNING: THIS TEST WILL NOT WORK ON OLD GROFF.
+.\" (IT DOES NOT SUPPORT THE `Lb' MACRO.)
+.\"
+.Dd $Mdocdate: May 26 2010 $
+.Dt FOO 1
+.Os
+.Sh NAME
+.Nm foo
+.Nd bar
+.Sh LIBRARY
+.Lb
+.Sh DESCRIPTION
+has been optimized for use by applications expecting system scope thread
+semantics, and can provide significant performance improvements
+compared to
+.Lb
+.Sh SEE ALSO
+.Xr pthread 3
--- /dev/null
+++ regress/mdoc/Lb/custom.in
@@ -0,0 +1,19 @@
+.\"
+.\" WARNING: THIS TEST WILL NOT WORK ON OLD GROFF.
+.\" (IT DOES NOT SUPPORT THE `Lb' MACRO.)
+.\"
+.Dd $Mdocdate: May 26 2010 $
+.Dt FOO 1
+.Os
+.Sh NAME
+.Nm foo
+.Nd bar
+.Sh LIBRARY
+.Lb xyzzy
+.Sh DESCRIPTION
+has been optimized for use by applications expecting system scope thread
+semantics, and can provide significant performance improvements
+compared to
+.Lb xyzzy
+.Sh SEE ALSO
+.Xr pthread 3
--
 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-05-26  9:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-26  9:35 mdocml: Fixed `Lb' to be in_line (reported by Ulrich Spoerlein) 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).