Hi.
> From: Jim Meyering <[email protected]>
> To: [email protected]
> Cc: [email protected]
> Subject: Re: STREQ in dfa.c
> Date: Sat, 31 Dec 2011 18:48:15 +0100
>
> [email protected] wrote:
>
> > There are not a lot of uses of STREQ in dfa.c. I'd be happy if you
> > expanded the macro there.
>
> Sorry, but that would be a step backwards.
> I find that direct use of strcmp is markedly less readable
> when the result is used as a boolean.
Interesting. I'd rather read
strcmp(x, y) == 0
and
strcmp(x, y) != 0
I am violently opposed to
! strcmp(x, y)
This moves into the realm of individual tastes...
> > Gawk's STREQ checks *a == *b before calling
> > strcmp, which is an OOOOLLLLDDDD speed hack from the PDP-11 / Vax
> > days. I should probably get rid of it.
>
> Good idea.
If I do I will just go to using straight calls to strcmp/strncmp,
but per your email, I won't mess with dfa.c. Some of the gawk code
already has direct calls to strcmp so I may as well make things
consistent.
Thanks,
Arnold