Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 2021 11:35:05 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Possibly malformed date in several manual pages
Message-ID:  <20210108113505.GA41405@freebsd.org>
In-Reply-To: <20210107080827.GA10295@freebsd.org>
References:  <20210107080827.GA10295@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--x+6KMIRAuhnl3hBn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Do. Jan.  7 2021, Alexander Best wrote:
> Hi everyone,
>=20
> while reading the VACATION(1) manual page I stumbled upon the following e=
ntry
> in the last line:
>=20
> 	$Date: 2013-11-22 20:52:02 $
>=20
> I then used "zcat `man -w vacation`|zgrep -n \$Date" to find the actual e=
ntry:

=2E.. either zcat OR zgrep would have been fine here ...
>=20
> 	14:.TH VACATION 1 "$Date: 2013-11-22 20:52:02 $"
>=20
> Looking at other manual pages such as CAT(1) via "zcat `man -w cat`|head =
-n 50"
> shows a different format:
>=20
> 	.Dd January 29, 2013
>=20
> Checking all the manual pages in /usr/share/man for the former format usi=
ng
> the following command
>=20
> 	$for i in `find /usr/share/man -type f`; do zgrep -l \$Date $i; done
>=20
> revealed several entries:
>=20
> /usr/share/man/man8/mailstats.8.gz
> /usr/share/man/man8/sendmail.8.gz
> /usr/share/man/man8/smrsh.8.gz
> /usr/share/man/man8/praliases.8.gz
> /usr/share/man/man8/purgestat.8.gz
> /usr/share/man/man8/editmap.8.gz
> /usr/share/man/man8/mail.local.8.gz
> /usr/share/man/man8/rmail.8.gz
> /usr/share/man/man8/makemap.8.gz
> /usr/share/man/man8/hoststat.8.gz
> /usr/share/man/man5/aliases.5.gz
> /usr/share/man/man1/mailq.1.gz
> /usr/share/man/man1/vacation.1.gz
> /usr/share/man/man1/dialog.1.gz
> /usr/share/man/man1/newaliases.1.gz
> /usr/share/man/man4/ubser.4.gz
> /usr/share/man/man3/dialog.3.gz
>=20
> Looking at the MDOC(7) manual page implies, that mdoc doesn't understand
> the TH-Macro. Is this expected behaviour? Or should the TH-Entries be tur=
ned
> into DD-Entries? Or should the TH-Entries remain for historical reasons?

Hi everyone,

after some further digging, I think I found the answer. Most of the manual =
pages
above reside within /usr/src/contrib and use the older man-syntax (man(7))
instead of the mdoc-syntax (mdoc(7)). Since these manual pages are the resu=
lt of
a vendor import to FreeBSD, it's not wise to change the manual pages, since=
 this
will increase the delta once a new import occurs.

man(1) (or actually mdoc(7)) automatically detects whether man- or mdoc-syn=
tax is
used within a manual page. From what I can see from the mdoc(7) manual, the
TH-macro conforms to the man-syntax:

".TH PROGNAME 1 1979-01-10"

"$Date:" and "$" in the vacation-example of course aren't pretty to have in=
 a
manual page, but I crosschecked with Linux and here those terms are also
displayed at the end of the according manual page.

One might could take care of this during the installation process of the ma=
nual
pages, but it's probably not worth the hassle.

Kind regards,
Alexander

>=20
> Kind regards,
> Alexander



--x+6KMIRAuhnl3hBn
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJf+ENoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ0NEFCRkJFNkIyOTQ5NkYzQzFFQTc5NDE3
RjQzRThCNkQ4OTM3NDUwAAoJEH9D6LbYk3RQljEP/Rmt517+mVqFUSA3C+d17RBo
YpyRPzEzZwz+fF7DLGrGa4iIqxib3AH3qtdMTnsT0JSTy6IsMPIROP25iQZ02iZ4
gJocSCDWIW5zr2COP47DWnYWHJ9TDXZNT7UO/Zl0KEWWYE2p0d17SW18+K/SN6/8
nQ3SjfJHA7r/5I754CLNBNdu5n6zisNK3m2s1PIAeXZ+OVY1mNbm5scltXaG/8Z9
g5SzxrQH/QpEqbP7IJQOmlag6zHhbluRIubsyiBYK5XPx8MBPa8BlbpFvzL8JRwJ
JVye8RIurh4CqK9ruCvF/+KiPBt6ceKTIRx6vwEA5yiJmWSGU/tGKD+6KP4SZkZe
wirvhO3FD8LLWA33pvye8RIuv50+1bjcHDmqBu/eS+it0rt1+20MuvyjR92UDJtB
wZVfi6Ml7WskVUp364uBXYfbpfIZgtWGqV0b0ZYuSsfG5TXBCCBoBcopqB1i3ryr
qN6ec1m2jCLtTBgBmyLMFR8BA1+QAj4a5EJF4UL7daTlJa6pqmtxxpq5fyTNkYFe
s5FqBoO1OSfYCDRTS8pTbKDDPU4j21R1UcdZq9VeGyGLxSNM7R4GC6XpqqCLGwiN
9Hc49nikLhmLSFPN7dTwYl1NvF1D6QWnFv+B08ynqJdUxhZ+oRc7gDfBDNwAVDdx
uNW2ieubns53DHcUr+BM
=6vtK
-----END PGP SIGNATURE-----

--x+6KMIRAuhnl3hBn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210108113505.GA41405>