Mercurial > hg > octave-jordi > gnulib-hg
changeset 4676:7779e842b2e1
Remove K&R cruft.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 10 Sep 2003 07:10:43 +0000 |
parents | 7135d3d3d962 |
children | b95345dafad0 |
files | lib/strchrnul.c m4/strchrnul.m4 |
diffstat | 2 files changed, 6 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/strchrnul.c +++ b/lib/strchrnul.c @@ -20,12 +20,11 @@ /* Find the first occurrence of C in S or the final NUL byte. */ char * -strchrnul (s, c_in) - const char *s; - int c_in; +strchrnul (const char *s, int c_in) { - while (*s && (*s != c_in)) + unsigned char c = c_in; + while (*s && (*s != c)) s++; - return (char*) s; + return (char *) s; }
--- a/m4/strchrnul.m4 +++ b/m4/strchrnul.m4 @@ -1,4 +1,4 @@ -# strchrnul.m4 serial 1 +# strchrnul.m4 serial 2 dnl Copyright (C) 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -18,6 +18,4 @@ ]) # Prerequisites of lib/strchrnul.c. -AC_DEFUN([gl_PREREQ_STRCHRNUL], [ - AC_CHECK_HEADERS_ONCE(string.h) -]) +AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])