Jim Meyering wrote:
> > Akim suggests to rename STREQ in lib/streq.h; what name would you suggest?
>
> STREQ_ retains the name and look while adding only one to the length.
> STREQ_opt is more descriptive, but longer
I generally prefer the more descriptive names. So, committed as follows:
2012-
Akim Demaille wrote:
> Le 24 févr. 2012 à 10:08, Jim Meyering a écrit :
>
>> Here's a complete patch, with the additional tweak of replacing
>> the other occurrence of str''cmp with $(s_).
>
> Actually I don't think you need it. Ironically,
> you need it only when not factoring it, and this
> give
Le 24 févr. 2012 à 10:08, Jim Meyering a écrit :
> Here's a complete patch, with the additional tweak of replacing
> the other occurrence of str''cmp with $(s_).
Actually I don't think you need it. Ironically,
you need it only when not factoring it, and this
gives a furious desire to factor it
Jim Meyering wrote:
> Akim Demaille wrote:
>
>> Also, FWIW, in Bison there are many more strcmp, but they do not
>> conform to the sc pattern.
>>
>> src/ielr.c:if (0 == strcmp (type, "lalr"))
>> src/ielr.c:else if (0 == strcmp (type, "ielr"))
>> src/ielr.c:else if (0 == strcmp (type, "c
Bruno Haible wrote:
>> That gnulib has two definitions is unfortunate, but I will not
>> volunteer to change the STREQ that I've been using ;-)
>> I don't see much value in streq.h, either, and hence, don't use it.
>
> The value of streq.h is an optimized definition which is used in a few
> places.
hi Bruno,
Le 23 févr. 2012 à 21:00, Bruno Haible a écrit :
>> I use STRNCMP_LIT defined in coreutils/src/system.h:
>>
>>/* Just like strncmp, but the second argument must be a literal string
>> and you don't specify the length. */
>>#define STRNCMP_LIT(s, literal) \
>> strncm
Hi Jim,
> That gnulib has two definitions is unfortunate, but I will not
> volunteer to change the STREQ that I've been using ;-)
> I don't see much value in streq.h, either, and hence, don't use it.
The value of streq.h is an optimized definition which is used in a few
places. I agree that your
/system.h:
>
>/* Just like strncmp, but the second argument must be a literal string
> and you don't specify the length. */
>#define STRNCMP_LIT(s, literal) \
> strncmp (s, "" literal "", sizeof (literal) - 1)
Good to know, thanks!
>>
Akim Demaille wrote:
> Also, FWIW, in Bison there are many more strcmp, but they do not
> conform to the sc pattern.
>
> src/ielr.c:if (0 == strcmp (type, "lalr"))
> src/ielr.c:else if (0 == strcmp (type, "ielr"))
> src/ielr.c:else if (0 == strcmp (type, "canonical-lr"))
How about thi
Also, FWIW, in Bison there are many more strcmp, but they do not
conform to the sc pattern.
src/ielr.c:if (0 == strcmp (type, "lalr"))
src/ielr.c:else if (0 == strcmp (type, "ielr"))
src/ielr.c:else if (0 == strcmp (type, "canonical-lr"))
Akim Demaille wrote:
> Bison features some warnings from syntax-check:
>
> prohibit_strcmp
> ../../doc/bison.texinfo:2572:if (strcmp (ptr->name,sym_name) == 0)
> ../../src/files.c:145: if (strcmp (ext, ".y") == 0)
> ../../src/muscle-tab.c:53: return
Hi!
Bison features some warnings from syntax-check:
prohibit_strcmp
../../doc/bison.texinfo:2572:if (strcmp (ptr->name,sym_name) == 0)
../../src/files.c:145: if (strcmp (ext, ".y") == 0)
../../src/muscle-tab.c:53: return strcmp (m1->key, m2->key) == 0;
../../src/musc
12 matches
Mail list logo