From ed5e4d34a16436a37c0e084666fcfb77cc4859c3 Mon Sep 17 00:00:00 2001
From: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 31 Jul 2025 14:42:59 +0200
Subject: [PATCH 4/4] improve man pages and some warnings.
Checking for warnings: mandoc -Tlint *.1
- Swap .St -p1003.1-2013 macro with text:
mdoc does not support this macro and some texts were changed, like commit
d4dfd42d3580ad36bedfdc5b8924ff6683981f53
- Typo fixes:
exeption -> exception.
- xargs.1: document -P extension.
- sed.1: remove use of .Pp of .Ss.
- Wrap lines to less than 80 characters and use a new sentence for each line.
- find.1: Xr reference C library functions.
When viewing sbase's man pages the date displayed at the bottom is
the current date rather than the date entered in the <program>.1
file.
According to this:
https://mandoc.bsd.lv/mdoc/details/date.html
The traditional man date format used by sbase (.Dd year-month-day)
is no longer recommended and no longer supported by GNU troff or
Heirloom Docs and as a result the current date is displayed instead.
Although this format is still accepted by mandoc for backward
compatibility.
For portability it states the standard mdoc date format should be
used instead: .Dd month day, year
I applied the following patch to sbase's last commit b30fb56 and
it fixes the issue.
Printing `undefined` to stdout means that the variable is valid but not
set. Instead, report an error in this case.
linux 4.13 appends the result of `getconf LFS_CFLAGS` to HOSTCFLAGS,
even if it prints `undefined`. This is arguably a bug in the Makefile,
but even so, getconf shouldn't report that unsupported variables are
valid.
The one specified by mdoc is hard to read for non-native
speakers from countries which read the date day-first (like
Germany, Greece, North-Korea, Swamp,...).
This is also consistent with how we generally specify dates
at suckless.org.
The logic is simple, it's just a pain in the ass to fill the
data-structures.
Some lines had to be commented out, as glibc/musl apparently
have not fully implemented the mandatory variables for the
2013 corrigendum of POSIX 2008.
Also added a manpage and the necessary entries in README.
I also removed it from the TODO.