groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: [mdoc]: Support C23 in the .St macro.


From: Ingo Schwarze
Subject: [groff] 01/01: [mdoc]: Support C23 in the .St macro.
Date: Tue, 7 Jan 2025 13:01:13 -0500 (EST)

schwarze pushed a commit to branch master
in repository groff.

commit b74005093292d4ec9c68210b3e6377bbe908087e
Author: Ingo Schwarze <schwarze@openbsd.org>
AuthorDate: Tue Jan 7 18:53:59 2025 +0100

    [mdoc]: Support C23 in the .St macro.
    
    * tmac/mdoc/doc-syms: Support .St -isoC-2023.
    * tmac/groff_mdoc.7.man: Document .St -isoC-2023.
    
    The mismatch of the year numbers is 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.
    
    The main reason for choosing "-isoC-2023" as the .St argument is to
    match what NetBSD, OpenBSD and mandoc already committed to their trees.
    Also, it aligns well with the existing "-isoC-2011".
    
    Not adding -isoC-2017 for C17 is intentional because that edition only
    fixes bugs and adds no features, so it's hard to see why anybody would
    want to reference it in a manual page.  Keeping the code and the
    documentation concise by avoiding needless arguments feels preferable.
    
    Addition suggested by Thomas Klausner <wiz at NetBSD dot org>.
    
    "No objection on my part."  gbranden@
---
 ChangeLog             | 13 +++++++++++++
 tmac/groff_mdoc.7.man |  2 ++
 tmac/mdoc/doc-syms    |  2 ++
 3 files changed, 17 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 9e8d5d2b7..8e5622ebe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2025-01-07  Ingo Schwarze <schwarze@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 is 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-05  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/an.tmac (SH): Restore closing brace escape sequence.
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]