This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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:
> 
>> Maxim,
>>
>> this patch is a cleanup of string/str-two-way.h.
>>
>> It:
>> - 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  <tom@codesourcery.com>
>>
>> 	* 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.
> 

Maxim,

> 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?

Thanks,
- Tom

> Thanks,
> 
> --
> Maxim Kuvyrkov
> KugelWorks
> 

2013-02-07  Tom de Vries  <tom@codesourcery.com>

	* 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.

diff --git a/string/str-two-way.h b/string/str-two-way.h
index 8912f24..1cc20ee 100644
--- a/string/str-two-way.h
+++ b/string/str-two-way.h
@@ -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
   LONG_NEEDLE_THRESHOLD.
 */
 
@@ -516,10 +520,8 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
 }
 
 #undef AVAILABLE
-#undef AVAILABLE1
-#undef AVAILABLE2
-#undef AVAILABLE1_USES_J
 #undef CANON_ELEMENT
 #undef CMP_FUNC
 #undef RET0_IF_0
 #undef RETURN_TYPE
+#undef CHECK_EOL

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]