[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6176: [PATCH 2/2] sort: --debug: output data independent key warning
From: |
Pádraig Brady |
Subject: |
bug#6176: [PATCH 2/2] sort: --debug: output data independent key warnings |
Date: |
Wed, 12 May 2010 15:07:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
On 12/05/10 14:55, Eric Blake wrote:
> On 05/12/2010 07:53 AM, Eric Blake wrote:
>> On 05/11/2010 05:39 PM, Pádraig Brady wrote:
>>> The attached patch gives warnings about questionable
>>> option combinations. For example:
>>>
>>> $ sort --debug -rb -k1,1n /dev/null
>>> ! options `-b' are ignored
>>> ! option `-r' only applies to last-resort comparison
>>
>> That looks awkward, both when compared to the GCS convention of listing
>> the program name rather than !, and in respect to plurality:
>>
>> sort: option `-b' is ignored
>> sort: option `-r' only applies to last-resort comparison
>
> Or, to put it more concretely,
>
>> + fprintf (stderr, _("! options `-%s' are ignored\n"), opts);
>> + free (opts);
>> + ugkey.reverse = ugkey_reverse;
>> + }
>> + if (!stable && ugkey.reverse)
>> + fprintf (stderr,
>> + _("! option `-r' only applies to last-resort comparison\n"));
>
> Why are we using fprintf(stderr) instead of error()?
>
I was thinking it was redundant to print the command
name when explicitly asking for warnings,but yes I think
you're right, I'll just error(). I'll fix up the plurality also.
BTW I'm not intending to push this second patch for at least a day.
cheers,
Pádraig.
- bug#6176: [PATCH 1/2] sort: add a --debug option to highlight key extents, Pádraig Brady, 2010/05/11
- bug#6176: [PATCH 2/2] sort: --debug: output data independent key warnings, Pádraig Brady, 2010/05/11
- bug#6176: [PATCH 2/2] sort: --debug: output data independent key warnings, Pádraig Brady, 2010/05/12
- bug#6176: [PATCH 2/2] sort: --debug: output data independent key warnings, Eric Blake, 2010/05/12
- bug#6176: [PATCH 2/2] sort: --debug: output data independent key warnings, Paul Eggert, 2010/05/14
- bug#6176: [PATCH 2/2] sort: --debug: output data independent key warnings, Pádraig Brady, 2010/05/14
- bug#6176: [PATCH 2/2] sort: --debug: output data independent key warnings, Pádraig Brady, 2010/05/14
- bug#6176: [PATCH] sort: adjust the leading blanks --debug warning, Pádraig Brady, 2010/05/22
bug#6176: [PATCH 1/2] sort: add a --debug option to highlight key extents, Jim Meyering, 2010/05/12