[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] df: new option: --total (-c) to produce grand total (in the
From: |
Jim Meyering |
Subject: |
Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du) |
Date: |
Tue, 02 Sep 2008 13:06:33 +0200 |
Andreas Schwab <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>> Kamil Dudka <address@hidden> wrote:
>>> +#define LOG_EQ(a,b) (((a)&&(b))||(!(a)&&!(b)))
>>
>> This can be written more simply as !((a) ^ (b))
>
> Only if the operands are already boolean, and then you can just use a == b.
Oh. Right. To be general, it'd have to be like this,
but this is probably too obtuse unless you're comfortable
with the "!!" pseudo operator idiom:
#define LOG_EQ(a, b) !((!!(a)) ^ (!!(b)))
- [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Kamil Dudka, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Kamil Dudka, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du),
Jim Meyering <=
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), James Youngman, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Kamil Dudka, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Kamil Dudka, 2008/09/03
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/03
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/03