discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Three small bugs?
@ 2010-05-26  8:55 Ulrich Spörlein
  2010-05-26  9:37 ` Three small bugs? (Second: Lb) Kristaps Dzonsons
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ulrich Spörlein @ 2010-05-26  8:55 UTC (permalink / raw)
  To: discuss

Hi all,

three nits I ran into:

1. sendmail's -man pages have a header like this:

.TH MAIL.LOCAL 8 "$Date: 2003/10/20 20:26:51 $"
.SH NAME
mail.local
\- store mail in a mailbox
.SH SYNOPSIS

where groff will put the date verbatim in the footer. mandoc however
will put the current date into the footer. It would be nice if this
could be made to take the third argument to .TH literally, if parsing as
a date fails.

2. in our libthr.3 references another lib using .Lb, where trailing
punctuation makes mandoc barf.

.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

Please note that this .Lb call is not in the LIBRARY section.

3. Another nit is the .Ud macro, which is used a couple of times like
this:

.Sh BUGS
The
.Nm
utility is
.Ud .

where the trailing punctuation is a) not required but should b) not
break mandoc. The full stop in the source is quite handy, imho, so you
know the sentence ends here.

Which other macros "silently" end a sentence (besides Ud and Bt)?


Cheers,
Uli
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Three small bugs?  (Second: Lb)
  2010-05-26  8:55 Three small bugs? Ulrich Spörlein
@ 2010-05-26  9:37 ` Kristaps Dzonsons
  2010-05-26 10:41 ` Three small bugs? (Ud handling) Kristaps Dzonsons
  2010-05-26 14:13 ` Three small bugs? (TH and dates) Kristaps Dzonsons
  2 siblings, 0 replies; 4+ messages in thread
From: Kristaps Dzonsons @ 2010-05-26  9:37 UTC (permalink / raw)
  To: discuss

> 2. in our libthr.3 references another lib using .Lb, where trailing
> punctuation makes mandoc barf.
> 
> .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
> 
> Please note that this .Lb call is not in the LIBRARY section.

Ulrich, fixed.  Thanks!  `Lb' is now an "in_line" macro (it still is not 
callable or parseable--this is a silly artificial restriction that can 
be lifted by editing its flags in mdoc_macro.c, but let's keep it as-is 
for now instead of fixing the -mdoc language).

I also added some regression tests and documented the macro in mdoc.7.

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Three small bugs? (Ud handling)
  2010-05-26  8:55 Three small bugs? Ulrich Spörlein
  2010-05-26  9:37 ` Three small bugs? (Second: Lb) Kristaps Dzonsons
@ 2010-05-26 10:41 ` Kristaps Dzonsons
  2010-05-26 14:13 ` Three small bugs? (TH and dates) Kristaps Dzonsons
  2 siblings, 0 replies; 4+ messages in thread
From: Kristaps Dzonsons @ 2010-05-26 10:41 UTC (permalink / raw)
  To: discuss

> 3. Another nit is the .Ud macro, which is used a couple of times like
> this:
> 
> .Sh BUGS
> The
> .Nm
> utility is
> .Ud .
> 
> where the trailing punctuation is a) not required but should b) not
> break mandoc. The full stop in the source is quite handy, imho, so you
> know the sentence ends here.
> 
> Which other macros "silently" end a sentence (besides Ud and Bt)?

If you look carefully, groff actually discards information.  Try

  .Ud ) ;
  .Ud zootsuit

and note that the trailing words are silently discarded.

I've now configured `Ud' to throw away its arguments and warn about it. 
  It also marks itself as a sentence.  Note that `Bt' is now also fixed 
to do the same.  I also added the mdoc.7 bits for `Ud'.

I also fixed `Rv' and `Ex' to have an EOS marker, while I was at it.

Thanks again,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Three small bugs? (TH and dates)
  2010-05-26  8:55 Three small bugs? Ulrich Spörlein
  2010-05-26  9:37 ` Three small bugs? (Second: Lb) Kristaps Dzonsons
  2010-05-26 10:41 ` Three small bugs? (Ud handling) Kristaps Dzonsons
@ 2010-05-26 14:13 ` Kristaps Dzonsons
  2 siblings, 0 replies; 4+ messages in thread
From: Kristaps Dzonsons @ 2010-05-26 14:13 UTC (permalink / raw)
  To: discuss

> 1. sendmail's -man pages have a header like this:
> 
> .TH MAIL.LOCAL 8 "$Date: 2003/10/20 20:26:51 $"
> .SH NAME
> mail.local
> \- store mail in a mailbox
> .SH SYNOPSIS
> 
> where groff will put the date verbatim in the footer. mandoc however
> will put the current date into the footer. It would be nice if this
> could be made to take the third argument to .TH literally, if parsing as
> a date fails.

Ulrich, fixed.  If libman encounters a non-standard date, it uses it
verbatim.  If it encounters nothing or an empty string, it prints the
current date.

It still prints a handy warning, however, if the date is bogus.

Thanks again,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-26 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-26  8:55 Three small bugs? Ulrich Spörlein
2010-05-26  9:37 ` Three small bugs? (Second: Lb) Kristaps Dzonsons
2010-05-26 10:41 ` Three small bugs? (Ud handling) Kristaps Dzonsons
2010-05-26 14:13 ` Three small bugs? (TH and dates) Kristaps Dzonsons

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