On Tue, Oct 25, 2005 at 07:21:59AM +0200, Marc Haber wrote:
> > Frankly, I see no reason to keep this wrapper. If you do not want
> > localized messages, run your scripts with LC_ALL=C.
>
> It is consistent with the way gettext is used in C programs,
I tend to disagree, but that's really not important ;)
> and it allows gettext to be disabled completely, which might be an
> advantage on low memory systems.
I do not know how to perform reliable memory benchmarks, but am pretty
sure that disabling gettext has no noticeable impact because localized
messages are not used at all with LC_ALL=C:
$ strace -e open /usr/sbin/adduser --help 2>&1 > /dev/null | grep locale
...
open("/usr/share/locale/fr_FR/LC_MESSAGES/adduser.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/share/locale/fr/LC_MESSAGES/adduser.mo", O_RDONLY) = 3
$ LC_ALL=C strace -e open /usr/sbin/adduser --help 2>&1 > /dev/null | grep
locale
$
In GNU libc, gettext() returns its argument in this case (and also when
no msgstr was found), so there is no string copy. If Locale::gettext
does the same (no idea whether this is true or not), gettext (with
LC_ALL=C) is very similar to
*gettext = sub { shift };
> I have committed your changes and will upload 3.78 later today. Can
> you then please take a new look at the package?
Sure. At the moment it did not yet reach my mirror, will look at it
later. Thanks for taking care.
Denis
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]