bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf (_("...%zu..."), X) where X is of type size_t


From: Oskar Liljeblad
Subject: Re: printf (_("...%zu..."), X) where X is of type size_t
Date: Sat, 1 Oct 2005 10:51:09 +0200
User-agent: Mutt/1.5.10i

On Saturday, October 01, 2005 at 10:45, Sergey Poznyakoff wrote:
> 
> > Perhaps GNU extensions PRIoSIZE, PRIuSIZE, PRIxSIZE, PRIXSIZE could be
> > added to GNU gettext.  That would mean we could write this instead:
> > 
> >      printf (_("The size is %"PRIuSIZE".\n"), size);
> 
> It would be nice. However, I doubt if it is possible: the string within
> _() will be expanded by preprocessor and glued together by cc itself,
> which means it will result in different literal strings on different
> machines. Gettext will have no means of knowing how exactly is PRIuSIZE
> expanded, so it will not be able to match the msgid.

That is already solved for other PRIxyy-macros by Bruno Haible I think.
This (untested) patch adds support for PRI*SIZE-macros to gettext,
which of course should to be defined somewhere else as well...

Regards

Oskar

Attachment: diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]