This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH][BZ 10871] Month names in genitive case
- From: Rafal Luzynski <digitalfreak at lingonborough dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 8 Jan 2016 12:26:28 +0100 (CET)
- Subject: Re: [RFC][PATCH][BZ 10871] Month names in genitive case
- Authentication-results: sourceware.org; auth=none
- References: <2092610127 dot 1000800 dot 1448578835402 dot JavaMail dot open-xchange at ox4 dot netart dot com dot pl> <20160108004700 dot GH25548 at vapier dot lan>
- Reply-to: Rafal Luzynski <digitalfreak at lingonborough dot com>
Thank you for your comments, Mike.
> On 8 Jan 2016 01:47 Mike Frysinger <vapier@gentoo.org> wrote:
>
> [...]
> because of this, and the other issues outlined here:
> https://sourceware.org/bugzilla/show_bug.cgi?id=10871#c7
>
> i think it'd be useful to start a thread on the POSIX list. %OB is not
> covered by the spec currently:
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html
That's true. But on the other hand I don't know what is the current
status of this document: http://austingroupbugs.net/view.php?id=258
> the route you went with here -- not adding any new symbols, and trying
> to make the %B behavior automatic -- makes sense to me. it means we
> don't really break existing apps, and if we change %B back if/when the
> POSIX standard includes %OB, then we continue to not really break.
That's exactly what I mean.
> > --- a/time/strptime_l.c
> > +++ b/time/strptime_l.c
> >
> > +static char const alt_month_name[][10] =
> > + {
> > + "January", "February", "March", "April", "May", "June",
> > + "July", "August", "September", "October", "November", "December"
> > + };
>
> why introduce a new array ? one with the same size & values already
> exists a few lines above this with the name "month_name".
> -mike
I've sacrificed the memory for the simplicity of the algorithm which
now (at least sometimes) has to check both basic and nominative month
names. But you're right, this can be implemented without this new
array. So I accept as a thing for me to do: remove this array if
not necessary.
Thanks,
Rafal Luzynski