CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/09/22 12:22:28
Modified files:
usr.bin/mandoc : out.c
Log message:
On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr(3)
now implements the C23 behaviour where passing a const pointer to
strchr(3) also returns a const pointer.
Solve this by disentangling the horribly complicated logic in
tblcalc_literal() that did multiple checks on "mw". Instead, handle
the case "maximum width -> parse into words and break lines" which
needs a mutable copy of the content separately from the case
"unlimited width" which works with the original const char*.
This makes the code much more readable. No functional change.
Small issue found by Lexi Winter <[email protected]>,
reported via Alexander Ziaee <[email protected]>.