Re: printf (_("...%zu..."), X) where X is of type size_t
From:
Sergey Poznyakoff
Subject:
Re: printf (_("...%zu..."), X) where X is of type size_t
Date:
Sat, 01 Oct 2005 10:50:45 EEST
Paul Eggert <address@hidden> 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.
Regards,
Sergey