* nl_langinfo: Fix fallback list of month names
@ 2024-02-06 21:07 Bruno Haible
2024-02-06 21:33 ` Paul Eggert
0 siblings, 1 reply; 3+ messages in thread
From: Bruno Haible @ 2024-02-06 21:07 UTC (permalink / raw)
To: bug-gnulib; +Cc: Eli Zaretskii
The refactoring done in
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=fcfce839e791e35b1be8378811d8f82e2b0ca99f
omitted the month name and the abbreviated month name for August.
This patch fixes it.
2024-02-06 Bruno Haible <bruno@clisp.org>
nl_langinfo: Fix fallback list of month names (regression 2014-07-07).
* lib/nl_langinfo.c (nl_langinfo): In the implementation for native
Windows, fix the results for MON_8..MON_12, ALTMON_8..ALTMON_12,
ABMON_8..ABMON_12.
diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c
index 2a6be82732..64ff93b0cb 100644
--- a/lib/nl_langinfo.c
+++ b/lib/nl_langinfo.c
@@ -462,7 +462,7 @@ nl_langinfo (nl_item item)
{
static char const months[][sizeof "September"] = {
"January", "February", "March", "April", "May", "June", "July",
- "September", "October", "November", "December"
+ "August", "September", "October", "November", "December"
};
case MON_1:
case MON_2:
@@ -526,7 +526,7 @@ nl_langinfo (nl_item item)
static char result[12][30];
static char const abmonths[][sizeof "Jan"] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
- "Sep", "Oct", "Nov", "Dec"
+ "Aug", "Sep", "Oct", "Nov", "Dec"
};
tmm.tm_mon = item - ABMON_1;
if (!strftime (buf, sizeof result[0], "%b", &tmm))
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: nl_langinfo: Fix fallback list of month names
2024-02-06 21:07 nl_langinfo: Fix fallback list of month names Bruno Haible
@ 2024-02-06 21:33 ` Paul Eggert
2024-02-06 22:17 ` Bruno Haible
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2024-02-06 21:33 UTC (permalink / raw)
To: Bruno Haible, bug-gnulib; +Cc: Eli Zaretskii
On 2/6/24 13:07, Bruno Haible wrote:
> The refactoring done in
> https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=fcfce839e791e35b1be8378811d8f82e2b0ca99f
> omitted the month name and the abbreviated month name for August.
Must be a Freudian slip. August is my least favorite month, dating back
to hot summers in Kansas in my youth....
Thanks for fixing that.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nl_langinfo: Fix fallback list of month names
2024-02-06 21:33 ` Paul Eggert
@ 2024-02-06 22:17 ` Bruno Haible
0 siblings, 0 replies; 3+ messages in thread
From: Bruno Haible @ 2024-02-06 22:17 UTC (permalink / raw)
To: bug-gnulib, Paul Eggert; +Cc: Eli Zaretskii
Paul Eggert wrote:
> > The refactoring done in
> > https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=fcfce839e791e35b1be8378811d8f82e2b0ca99f
> > omitted the month name and the abbreviated month name for August.
>
> Must be a Freudian slip.
Probably merely an editing mistake: A line break was required before "August",
so Eli probably removed it from the end of the line and forgot to yank it
at the beginning of the next line. And since the array's length (12) was
omitted from the declaration, the compiler could not warn about a missing
initializer.
Bruno
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-06 22:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 21:07 nl_langinfo: Fix fallback list of month names Bruno Haible
2024-02-06 21:33 ` Paul Eggert
2024-02-06 22:17 ` Bruno Haible
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).