[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ASCII_ONLY?
From: |
Bruno Haible |
Subject: |
Re: ASCII_ONLY? |
Date: |
Sat, 08 Dec 2012 03:40:28 +0100 |
User-agent: |
KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; ) |
Hi Ben,
> gnulib has three definitions of ASCII_ONLY in files that #include
> "vasnprintf.c":
>
> lib/unistdio/u16-vasnprintf.c:#define ASCII_ONLY 1
> lib/unistdio/u32-vasnprintf.c:#define ASCII_ONLY 1
> lib/unistdio/u8-vasnprintf.c:#define ASCII_ONLY 1
>
> But I don't see any actual uses of this macro. What is the
> intent? (Is it related to FCHAR_T_ONLY_ASCII?)
Bingo! The comments in vasnprintf.c say:
FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters
in the format string are ASCII. MUST be set if
FCHAR_T and DCHAR_T are not the same type.
And in lib/unistdio/u{8,16,32}-vasnprintf.c FCHAR_T and DCHAR_T are indeed
not the same type. Therefore the 3 files should define FCHAR_T_ONLY_ASCII,
not ASCII_ONLY.
I would be grateful to you if you could commit the obvious fix.
Did you find this by code inspection, or through a gcc or clang warning?
Bruno