This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[review v5] localedef: Add verbose messages for failure paths.
- From: "Adhemerval Zanella (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Carlos O'Donell <carlos at redhat dot com>, libc-alpha at sourceware dot org
- Cc: Florian Weimer <fweimer at redhat dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Tue, 17 Dec 2019 07:27:56 -0500
- Subject: [review v5] localedef: Add verbose messages for failure paths.
- Auto-submitted: auto-generated
- References: <gerrit.1571944987000.I28b9f680711ff00252a2cb15625b774cc58ecb9d@gnutoolchain-gerrit.osci.io>
- Reply-to: gnutoolchain-gerrit at osci dot io
Adhemerval Zanella has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/303
......................................................................
Patch Set 5: Code-Review+2
(1 comment)
| --- locale/programs/localedef.c
| +++ locale/programs/localedef.c
| @@ -601,3 +591,16 @@ normalize_codeset (const char *codeset, size_t name_len)
| - }
| -
| - return (const char *) retval;
| + /* If there were only digits we assume it's an ISO standard and we will
| + prefix with 'iso' so include space for that. */
| + wp = retval = xasprintf ("%s%.*s", only_digit ? "iso" : "", len, "");
| +
| + /* Skip "iso". */
| + if (only_digit)
| + wp += 3;
PS5, Line 597:
Ok.
| +
| + /* Lowercase all characters. */
| + for (cnt = 0; cnt < name_len; ++cnt)
| + if (isalpha (codeset[cnt]))
| + *wp++ = tolower (codeset[cnt]);
| + else if (isdigit (codeset[cnt]))
| + *wp++ = codeset[cnt];
| +
| + /* Return allocated and converted name for caller to free. */
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: I28b9f680711ff00252a2cb15625b774cc58ecb9d
Gerrit-Change-Number: 303
Gerrit-PatchSet: 5
Gerrit-Owner: Carlos O'Donell <carlos@redhat.com>
Gerrit-Reviewer: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Gerrit-Reviewer: Carlos O'Donell <carlos@redhat.com>
Gerrit-Reviewer: Florian Weimer <fweimer@redhat.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Tue, 17 Dec 2019 12:27:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment