diff options
-rw-r--r-- | mdoc.7 | 30 | ||||
-rw-r--r-- | mdoc.c | 4 | ||||
-rw-r--r-- | mdoc_macro.c | 4 | ||||
-rw-r--r-- | mdoc_validate.c | 5 | ||||
-rw-r--r-- | regress/mdoc/Lb/blank.in | 19 | ||||
-rw-r--r-- | regress/mdoc/Lb/body.in | 17 | ||||
-rw-r--r-- | regress/mdoc/Lb/custom.in | 19 | ||||
-rw-r--r-- | regress/mdoc/Lb/prolog.in | 19 |
8 files changed, 108 insertions, 9 deletions
@@ -1,4 +1,4 @@ -.\" $Id: mdoc.7,v 1.108 2010/05/15 16:24:37 kristaps Exp $ +.\" $Id: mdoc.7,v 1.109 2010/05/26 09:35:35 kristaps Exp $ .\" .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 15 2010 $ +.Dd $Mdocdate: May 26 2010 $ .Dt MDOC 7 .Os .Sh NAME @@ -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. @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.138 2010/05/25 12:37:20 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.139 2010/05/26 09:35:35 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -560,6 +560,8 @@ mdoc_ptext(struct mdoc *m, int line, char *buf, int offs) * 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) { diff --git a/mdoc_macro.c b/mdoc_macro.c index 6754c9a0..274103fd 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.68 2010/05/17 22:11:42 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.69 2010/05/26 09:35:35 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -171,7 +171,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { 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 */ diff --git a/mdoc_validate.c b/mdoc_validate.c index 409b4624..56a587ff 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.82 2010/05/25 12:44:53 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.83 2010/05/26 09:35:35 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -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 */ diff --git a/regress/mdoc/Lb/blank.in b/regress/mdoc/Lb/blank.in new file mode 100644 index 00000000..7a599323 --- /dev/null +++ b/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 diff --git a/regress/mdoc/Lb/body.in b/regress/mdoc/Lb/body.in new file mode 100644 index 00000000..ad7bddb3 --- /dev/null +++ b/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 diff --git a/regress/mdoc/Lb/custom.in b/regress/mdoc/Lb/custom.in new file mode 100644 index 00000000..83a181f8 --- /dev/null +++ b/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 diff --git a/regress/mdoc/Lb/prolog.in b/regress/mdoc/Lb/prolog.in new file mode 100644 index 00000000..6f7e7368 --- /dev/null +++ b/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 |