This is the mail archive of the
mailing list for the glibc project.
Re: str-two-way.h cleanup
On 09/02/13 08:05, Maxim Kuvyrkov wrote:
> On 8/02/2013, at 12:28 AM, Tom de Vries wrote:
>> this patch is a cleanup of string/str-two-way.h.
>> - fixes a typo in a macro name in the header comment
>> - adds 2 macros to a macro list in the header comment
>> - removes 3 superfluous undefines at the end of the file
>> - adds one missing undefine at the end of the file
>> 2013-02-07 Tom de Vries <firstname.lastname@example.org>
>> * string/str-two-way.h: Fix typo RESULT_TYPE -> RETURN_TYPE in comment.
>> Add RET0_IF_0 and CHECK_EOL to macro list in comment.
>> (AVAILABLE1, AVAILABLE2, AVAILABLE1_USES_J): Remove superfluous undef.
>> (CHECK_EOL): Add undef.
> The patch is OK. Thanks for cleaning this up.
thanks for the review.
> Please make sure that the changelog entry above does not overflow 79 character line.
I read here (
http://sourceware.org/glibc/wiki/Style_and_Conventions#A79-Column_Lines ) that
GLIBC source files have a 79 column limit, but
I read here ( 11. Properly Formatted GNU ChangeLog @
http://sourceware.org/glibc/wiki/Contribution%20checklist ) that GLIBC
changelogs have an 80 column limit.
I was not aware of the 79 column limit on source files, so it's good to know
that, but AFAIU the changelog of the original patch with an 80-column line in it
is ok. But in case I misunderstand, I've attached a patch with has a 79 column
limit for the changelog.
I've also now managed to build and test the patch on x86_64, no issues found.
Since I've got no write permission, could you apply the patch?
> Maxim Kuvyrkov
2013-02-07 Tom de Vries <email@example.com>
* string/str-two-way.h: Fix typo RESULT_TYPE -> RETURN_TYPE in
Add RET0_IF_0 and CHECK_EOL to macro list in comment.
(AVAILABLE1, AVAILABLE2, AVAILABLE1_USES_J): Remove superfluous undef.
(CHECK_EOL): Add undef.
diff --git a/string/str-two-way.h b/string/str-two-way.h
index 8912f24..1cc20ee 100644
@@ -19,7 +19,7 @@
/* Before including this file, you need to include <string.h> (and
<config.h> before that, if not part of libc), and define:
- RESULT_TYPE A macro that expands to the return type.
+ RETURN_TYPE A macro that expands to the return type.
AVAILABLE(h, h_l, j, n_l)
A macro that returns nonzero if there are
at least N_L bytes left starting at H[J].
@@ -37,7 +37,11 @@
The argument is an 'unsigned char'; the result
must be an 'unsigned char' as well.
- This file undefines the macros documented above, and defines
+ Other macros you may optionally define:
+ RET0_IF_0(a) Documented below at default definition.
+ CHECK_EOL Same.
+ This file undefines the macros listed above, and defines
@@ -516,10 +520,8 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,