Andreas Schwab <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: >> Kamil Dudka <[EMAIL PROTECTED]> 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))) _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
