Hi Stuart,
Yeah I noticed when I was working with this yesterday evening, which lead me to another question about building from the source tree, but I digress...
Thanks.
On Fri, Nov 28, 2025, 3:06 AM Stuart Henderson <stu@spacehopper.org> wrote:
this diff is for libc rather than ports. it will definitely fix this problem, the question is whether it's acceptable to commit it like this.--Sent from a phone, apologies for poor formatting.On 27 November 2025 20:52:48 Claudio Miranda <quadsix50@gmail.com> wrote:Hi Stuart,I can give this a try this weekend if it's not already applied. I'vegot the ports tree checked out via CVS on my laptop to give this atest and report back.Regards,-ClaudioOn Wed, Nov 26, 2025 at 5:10 AM Stuart Henderson<stu.lists@spacehopper.org> wrote:[This message has also been posted to gmane.os.openbsd.misc.]On 2025-11-26, Claudio Miranda <quadsix50@gmail.com> wrote:--0000000000001fa64a0644755b51Content-Type: text/plain; charset="UTF-8"Greetings and apologies for the delayed reply to the list and to Carson.moving to tech@ and CC'ing maintainerSo, I finally had a chance to look at this, and it's actually "_I" (asin "India") and not a lowercase L as I originally thought (changingthe application font in MATE to Serif confirmed this). While notdirectly related to what I found, this bug report for the clock appletgave me a hint as to what exactly the typo is, and it looks like itshould be "%_I" (as in "India"). The percent sign is missing, hencethe time showing up as "_I:ss PM" (where "ss" is seconds whichdisplays correctly on the applet).I've only seen this happen on the OpenBSD port of the MATE Clockapplet. Checked MATE Clock on FreeBSD and Fedora (where I run MATEDesktop) and those display correctly.to fix that issue, mate-panel changed from one strftime extension(%l, supported by OpenBSD but not musl libc) to another (%_I, glibcextension, supported by musl libc, FreeBSD and reportedly AIX, Solaris)the %_ extension is from a set of three modifiers which specify paddingbehaviour instead of the default for the following format character:%0K - like %K but pad numbers with zeros%_K - like %K but pad numbers with spaces%-K - like %K but do not pad numberspatching this in mate-panel is a pain because the strftime stringsare used as translated strings (i.e. changing to the common localformat where available) so a bunch of .po files would need patches.taking a cue from libc's "support" for %E/%O (C99 locale modifierswhich are recognised but ignored) here's a diff to ignore the modifiersso at least we'd get something sensible printed in these cases. (iftesting with date(1) note that it's statically linked). would thisor something like it make sense?Index: time/strftime.c===================================================================RCS file: /cvs/src/lib/libc/time/strftime.c,vdiff -u -p -r1.34 strftime.c--- time/strftime.c 16 May 2025 14:24:39 -0000 1.34+++ time/strftime.c 26 Nov 2025 10:06:55 -0000@@ -477,6 +477,16 @@ label:pt = _fmt(Locale->date_fmt, t, pt, ptlim,warnp);continue;+ case '0':+ case '-':+ case '_':+ /*+ * GNU libc extensions.+ * 0 should explicitly specify zero for padding.+ * - should avoid padding numerical outputs.+ * _ should xplicitly specify space for padding.+ */+ goto label;case '%':/*** X311J/88-090 (4.12.3.5): if conversion char isIndex: time/strptime.c===================================================================RCS file: /cvs/src/lib/libc/time/strptime.c,vdiff -u -p -r1.34 strptime.c--- time/strptime.c 20 Nov 2025 10:59:56 -0000 1.34+++ time/strptime.c 26 Nov 2025 10:06:55 -0000@@ -132,6 +132,15 @@ literal:break;/*+ * "Padding" modifiers. Not handled but set the appropriate+ * flag and start over again.+ */+ case '_': /* "%_?" pad numbers with spaces. */+ case '0': /* "%0?" pad numbers with zeros. */+ case '-': /* "%-?" do not pad numbers. */+ goto again;++ /** "Alternative" modifiers. Just set the appropriate flag* and start over again.*/
No comments:
Post a Comment