Hello, here is a small patch to support a new -isoC-2023 argument for the .St macro in the mdoc(7) language.
I think supporting that argument makes sense because C23 is a major version of the C standard adding several features, so i expect that many manual page authors will want to reference it in STANDARDS sections of manual pages in the future. Admittedly, the .St macro is not very well designed, so maintaining it is a bit awkward. In particular, it would not be a good idea to add arguments for every obscure standard someone might come across - that would bloat the language and the documentation and provide little benefit, if any. However, major revisions of the C standard and of POSIX are the exceptions where adding an argument does seem to make sense. An equivalent patch has already been committed to portable mandoc, to OpenBSD and to NetBSD. So in addition to providing benefit for documentation authors using GNU roff, pushing this patch will also provide value for people merely reading manual pages using GNU roff, since this patch will improve compatibility with BSD manual pages. Kudos to Thomas Klausner <wiz at NetBSD dot org> for originally suggesting this addition. Thomas also suggested adding -isoC-2017 and did so in NetBSD, but i disagree with that and am not planning to add it to portable mandoc or to OpenBSD. Since C17 is merely a bugfix release of C11 and does not provide any new features, i see no good reason why anybody might ever want to mention it in documentation. Hence, i think it's better to not introduce a macro argument for that bugfix version. I'm not opening a Savannah ticket because i see no danger of this patch lingering. If no groff developer objects, i'm planning to push it in a few days. If there is useful feedback, a tweaked version might get pushed, but either way, we'll have it out of the way very soon. New years' greetings and all the best for you in 2025, Ingo diff --git a/ChangeLog b/ChangeLog index ec3d025d0..3f0064f79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2025-01-02 Ingo Schwarze <schwa...@openbsd.org> + + * tmac/mdoc/doc-syms: Support .St -isoC-2023. + * tmac/groff_mdoc.7.man: Document .St -isoC-2023. + + The mismatch of the year numbers ist not a typo. + The official name is "ISO/IEC 9899:2024", so the "4" is correct there. + + But as a colloquial name, "C23" is more widespread than "C24", + probably because __STDC_VERSION__ == 202311L: The final version + of the standard was ready in 2023, only formally publishing it + took about 11 months after it was ready. + 2025-01-01 G. Branden Robinson <g.branden.robin...@gmail.com> * src/utils/afmtodit/afmtodit.pl: Report input file name and diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man index 41a54790d..f3a4f5227 100644 --- a/tmac/groff_mdoc.7.man +++ b/tmac/groff_mdoc.7.man @@ -2468,6 +2468,8 @@ are: .St -isoC-99 .It Li \-isoC\-2011 .St -isoC-2011 +.It Li \-isoC\-2023 +.St -isoC-2023 .El .Pp . diff --git a/tmac/mdoc/doc-syms b/tmac/mdoc/doc-syms index 479f70231..e93457c67 100644 --- a/tmac/mdoc/doc-syms +++ b/tmac/mdoc/doc-syms @@ -621,6 +621,8 @@ .als doc-str-St--isoC-90 doc-str-St--isoC .ds doc-str-St--isoC-2011 ISO/IEC\*[doc-str-St] 9899:2011 .as doc-str-St--isoC-2011 " (\*[Lq]ISO\~C\^11\*[doc-str-St]\*[Rq]) +.ds doc-str-St--isoC-2023 ISO/IEC\*[doc-str-St] 9899:2024 +.as doc-str-St--isoC-2023 " (\*[Lq]ISO\~C\^23\*[doc-str-St]\*[Rq]) .ds doc-str-St--isoC-99 ISO/IEC\*[doc-str-St] 9899:1999 .as doc-str-St--isoC-99 " (\*[Lq]ISO\~C\^99\*[doc-str-St]\*[Rq]) .ds doc-str-St--isoC-amd1 ISO/IEC\*[doc-str-St] 9899/AMD1:1995