bug-coreutils
[Top][All Lists]
Advanced

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

Re: tiny string fixes [patches]


From: Micah Cowan
Subject: Re: tiny string fixes [patches]
Date: Mon, 04 Aug 2008 18:05:23 -0700
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Meyering wrote:
> Benno Schulenberg <address@hidden> wrote:
>> Hi,
>>
>> While updating the Dutch translation for coreutils, I came across a
>> few small inconsistencies.  Attached patches fix those.
> 
> Hi Benno,
> 
> Thanks for all the patches!
> 
> Starting with the last one...
> 
>> -      _(EXIT_STATUS == EXIT_SUCCESS
>> -        ? "Exit with a status code indicating success."
>> -        : "Exit with a status code indicating failure."));
>> +      EXIT_STATUS == EXIT_SUCCESS
>> +      ? _("Exit with a status code indicating success.")
>> +      : _("Exit with a status code indicating failure."));
> 
> I'd like to keep it so there's just one gettext call,
> so solved the problem slightly differently:

Here's what the ISO C standard says about the conditional operator:

«The first operand is evaluated; there is a sequence point after its
evaluation. The second operand is evaluated only if the first compares
unequal to 0; the third operand is evaluated only if the first compares
equal to 0; the result is the value of the second or third operand
(whichever is evaluated), converted to the type described below.)»

Of course, it's still possible that the resulting code will contain two
distinct places where gettext is called; but in any case there will be
only one actual call.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
GNU Maintainer: wget, screen, teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIl6dS7M8hyUobTrERAg93AJ9SySIe75lgVyGbZ2EEm80NLWL9CwCfRWiC
UyvlCwFQqLswmSas6NWa0U0=
=5Utw
-----END PGP SIGNATURE-----




reply via email to

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