This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Support for %d$c format specifier in diagnostics.c
- From: Ishikawa <ishikawa at yk dot rim dot or dot jp>
- To: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, Zack Weinberg <zack at codesourcery dot com>, Neil Booth <neil at daikokuya dot co dot uk>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Jul 2003 07:09:10 +0900
- Subject: Re: Support for %d$c format specifier in diagnostics.c
- References: <m19WKhW-000H3mC@standard.erephon> <20030628193135.GA1767@daikokuya.co.uk> <87llvlk3gi.fsf@egil.codesourcery.com> <3EFE65DC.52576EC7@yk.rim.or.jp> <87vfupiglu.fsf@egil.codesourcery.com> <3EFEE0EF.C560ED1A@yk.rim.or.jp> <87isqoiwng.fsf@egil.codesourcery.com> <3F061172.814BA7A0@yk.rim.or.jp> <Pine.LNX.4.56.0307051127540.6302@kern.srcf.societies.cam.ac.uk> <3F0CA938.1FA02D3E@yk.rim.or.jp> <m3vfuayizy.fsf@uniton.integrable-solutions.net> <3F1A1654.4476090C@yk.rim.or.jp> <Pine.LNX.4.56.0307201539320.2839@kern.srcf.societies.cam.ac.uk> <3F1B275C.515D7FE1@yk.rim.or.jp> <Pine.LNX.4.56.0307211006170.10463@kern.srcf.societies.cam.ac.uk>
"Joseph S. Myers" wrote:
> It is not for the Turkish translators to know that GCC has its own
> diagnostic implementation which doesn't yet implement this feature needed
> for effective l10n - they just translate and presume that this printf
> feature will work. Nor is it for them to know how to generate all the
> messages in GCC to test whether the translation works (although forcing
> the testsuite to run under another locale and looking for extra crashes
> will do some of that) - they translate many different GNU programs. When
> this feature is implemented in GCC, such translations will start to work.
Right. Come to think of it, many other GNU programs simply use
fprintf() family of routines and if GLIBC and/or
native libc supports the positional parameters, then the
message using $1%d, etc. will work. So presumably for other
tools such positional parameter usage is not so strange.
I will post a few other findings about decoders in
responses to other replies.
--
int main(void){int j=2003;/*(c)2003 cishikawa. */
char t[] ="<CI> @abcdefghijklmnopqrstuvwxyz.,\n\"";
char *i ="g>qtCIuqivb,gCwe\np@.ietCIuqi\"tqkvv is>dnamz";
while(*i)((j+=strchr(t,*i++)-(int)t),(j%=sizeof t-1),
(putchar(t[j])));return 0;}/* under GPL */