summaryrefslogtreecommitdiffstats
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
commit1229fdd9d84784744b71813ed8b0845b20d4f2ee (patch)
tree910fe16abd594a977f7582d13da64db5dab06b4c
parent47413dce678dda2ae975720bf472a4a00ecde62a (diff)
downloadmandoc-1229fdd9d84784744b71813ed8b0845b20d4f2ee.tar.gz
Documented `Fl' in mdoc.7.
Backed out stipulation that `Fl ""' is ignored: this is not the case in !OpenBSD groffs.
-rw-r--r--mdoc.722
-rw-r--r--mdoc_html.c20
-rw-r--r--mdoc_term.c10
3 files changed, 26 insertions, 26 deletions
diff --git a/mdoc.7 b/mdoc.7
index 89481df1..7ee2b70e 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -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 719d9df5..e43d9809 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -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 82d32adc..6127a0d9 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -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. */