summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 13:35:30 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 13:35:30 +0000
commit53a939341c20a0b9fe3c63717b0dd0ac26ad73f7 (patch)
treeeb70892bcc2cc1258c15e72ebaaf2f8635695e8a
parent8dfb6885b4ca139f27de89b37393a0570defeee6 (diff)
downloadmandoc-53a939341c20a0b9fe3c63717b0dd0ac26ad73f7.tar.gz
mandoc-53a939341c20a0b9fe3c63717b0dd0ac26ad73f7.tar.zst
mandoc-53a939341c20a0b9fe3c63717b0dd0ac26ad73f7.zip
Documented `Fl' in mdoc.7.
Backed out stipulation that `Fl ""' is ignored: this is not the case in !OpenBSD groffs.
-rw-r--r--mdoc.726
-rw-r--r--mdoc_html.c22
-rw-r--r--mdoc_term.c12
3 files changed, 30 insertions, 30 deletions
diff --git a/mdoc.7 b/mdoc.7
index e7daa27b..cc3d1970 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.7,v 1.78 2009/11/16 09:52:47 kristaps Exp $
+.\" $Id: mdoc.7,v 1.79 2010/01/01 13:35:30 kristaps Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -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: November 16 2009 $
+.Dd $Mdocdate: January 1 2010 $
.Dt MDOC 7
.Os
.
@@ -1596,6 +1596,22 @@ is provided.
.Ss \&Fc
.Ss \&Fd
.Ss \&Fl
+Command-line flag. Used when listing arguments to command-line
+utilities. Prints a fixed-width hyphen
+.Sq \-
+before each delimited argument. If no arguments are provided, a hyphen
+is still printed.
+.Pp
+Examples:
+.Bd -literal -offset indent
+\&.Fl a b c
+\&.Fl
+\&.Op Fl o Ns Ar file
+.Ed
+.Pp
+See also
+.Sx \&Cm .
+.
.Ss \&Fn
.Ss \&Fo
.Ss \&Fr
@@ -1830,6 +1846,12 @@ file re-write
.Pp
.Bl -dash -compact
.It
+Historic
+.Xr groff 1
+does not print a dash for empty
+.Sx \&Fl
+arguments. This behaviour has been discontinued.
+.It
.Xr groff 1
behaves strangely (even between versions) when specifying
.Sq \ef
diff --git a/mdoc_html.c b/mdoc_html.c
index fef64209..e6d3dace 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.50 2010/01/01 13:17:58 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.51 2010/01/01 13:35:30 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -659,25 +659,13 @@ mdoc_fl_pre(MDOC_ARGS)
{
struct htmlpair tag;
+ PAIR_CLASS_INIT(&tag, "flag");
+ print_otag(h, TAG_SPAN, 1, &tag);
+
/* `Cm' has no leading hyphen. */
- if (MDOC_Cm == n->tok) {
- PAIR_CLASS_INIT(&tag, "flag");
- print_otag(h, TAG_SPAN, 1, &tag);
+ if (MDOC_Cm == n->tok)
return(1);
- }
-
- /* A zero-length child shouldn't get a dash. */
-
- if (n->child) {
- assert(MDOC_TEXT == n->child->type);
- assert(n->child->string);
- if ('\0' == *n->child->string)
- return(0);
- }
-
- PAIR_CLASS_INIT(&tag, "flag");
- print_otag(h, TAG_SPAN, 1, &tag);
print_text(h, "\\-");
diff --git a/mdoc_term.c b/mdoc_term.c
index f465a559..bc222436 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.103 2010/01/01 13:17:59 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.104 2010/01/01 13:35:30 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -1019,16 +1019,6 @@ termp_fl_pre(DECL_ARGS)
{
term_fontpush(p, TERMFONT_BOLD);
-
- /* A zero-length child shouldn't get a dash. */
-
- if (n->child) {
- assert(MDOC_TEXT == n->child->type);
- assert(n->child->string);
- if ('\0' == *n->child->string)
- return(0);
- }
-
term_word(p, "\\-");
/* A blank `Fl' should incur a subsequent space. */