public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] localedef: Support building for older C standards
@ 2022-07-05 8:51 Florian Weimer
0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2022-07-05 8:51 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9d77023bf33ca5d0b07c318fe9fbe4347f0ae25a
commit 9d77023bf33ca5d0b07c318fe9fbe4347f0ae25a
Author: Florian Weimer <fweimer@redhat.com>
Date: Tue Jul 5 10:30:20 2022 +0200
localedef: Support building for older C standards
Fixes commit b15538d77c6a7893c8bb42831dcd3a1a12b727d4
("locale: localdef input files are now encoded in UTF-8").
Diff:
---
locale/programs/linereader.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
index b484327969..0460074a0c 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -330,15 +330,17 @@ lr_token (struct linereader *lr, const struct charmap_t *charmap,
break;
case 0x80 ... 0xff: /* UTF-8 sequence. */
- uint32_t wch;
- if (!utf8_decode (lr, ch, &wch))
- {
- lr->token.tok = tok_error;
- return &lr->token;
- }
- lr->token.tok = tok_ucs4;
- lr->token.val.ucs4 = wch;
- return &lr->token;
+ {
+ uint32_t wch;
+ if (!utf8_decode (lr, ch, &wch))
+ {
+ lr->token.tok = tok_error;
+ return &lr->token;
+ }
+ lr->token.tok = tok_ucs4;
+ lr->token.val.ucs4 = wch;
+ return &lr->token;
+ }
}
return get_ident (lr);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-05 8:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 8:51 [glibc] localedef: Support building for older C standards Florian Weimer
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).