Paul Eggert wrote: > Alejandro Colomar proposed that the C standardization committee add the > <string.h> functions streq[1] and memeq[2] with the obvious semantics.
Thanks for tracking the WG14 work so closely! > As Gnulib already has a streq module with different meaning, I named the > new module "stringeq" Thanks. While renaming modules can be done in the long term, it usually requires a long migration phase. A code review: 0001 > +#define STRING_INLINE _GL_EXTERN_INLINE Typo: s/STRING_INLINE/_GL_STRING_INLINE/ (It's fixed in 0002. Better use 'git rebase -i' with 'edit' in order to fix it in 0001.) > memeq (char const *__s1, char const *__s2, size_t __n) Why are the arguments of type 'char const *', not 'void const *', like for the other mem* functions? (It's fixed in 0002. Better use 'git rebase -i' with 'edit' in order to fix it in 0001.) 0002 Code with memeq is definitely more readable than with memcmp (...) == 0; this patch proves it. Please revert the patch to lib/gen-uni-tables.c, or make sure that memeq gets defined as a macro near the top. This file is compiled directly with gcc, without creating a testdir first. lib/mbchar.h line 220: There's a misindentation here. lib/readutmp.c line 425: This change is bogus; please revert that. The change to modules/stringeq should also better be moved to 0001. 0003 Please revisit the patch to lib/gen-uni-tables.c. Like above. Bruno
