From: He X <xw897002528@gmail.com>
To: musl@lists.openwall.com
Subject: Re: [setlocale]: return only one copy if all six parts of locale are same
Date: Sat, 18 Mar 2017 23:00:52 +0800 [thread overview]
Message-ID: <CAPG2z09v5pMMUuvZYsgTxFrX5YRXk3g7YX1eGTXyQKeijWbsoA@mail.gmail.com> (raw)
In-Reply-To: <20170318143954.GP1693@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
Wow, tested. Thx for improvements. Learnt a lots from recent patches
related to locale.
Sincerely thank you, rich :)
xhe
2017-03-18 22:39 GMT+08:00 Rich Felker <dalias@libc.org>:
> On Sat, Mar 18, 2017 at 09:48:41PM +0800, He X wrote:
> > oops, i missed UNLOCK(lock).
> >
> > [...]
> > >>
> > >> I think the results of this patch can be achieved much more simply.
> > >> Just compare lm pointers (rather than string contents) for equality at
> > >> each iteration in the current loop, counting how many were equal to
> > >> libc.global_locale.cat[0]. If that number equals LC_ALL, return
> > >> libc.global_locale.cat[0]->name (or "C" if the lm is null) rather
> than
> > >> buf.
> > >>
> > >> Rich
> > >>
> > >
> > >
>
> By simpler I meant something like the attached.
>
> Rich
>
[-- Attachment #2: Type: text/html, Size: 1528 bytes --]
prev parent reply other threads:[~2017-03-18 15:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-18 7:37 He X
2017-03-18 12:33 ` Rich Felker
2017-03-18 13:36 ` He X
2017-03-18 13:48 ` He X
2017-03-18 14:39 ` Rich Felker
2017-03-18 15:00 ` He X [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPG2z09v5pMMUuvZYsgTxFrX5YRXk3g7YX1eGTXyQKeijWbsoA@mail.gmail.com \
--to=xw897002528@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).