From 28e351249e754446ab86c9cdc5bdbe2747cff998 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Jun 1999 09:25:22 +0000 Subject: Update. * sysdeps/generic/strchr.c: Include and use reg_char for character to search, to help the compiler. * sysdeps/generic/strchrnul.c: Likewise. * sysdeps/generic/memchr.c: Likewise. * sysdeps/generic/memccpy.c: Likewise. * sysdeps/generic/rawmemchr.c: Likewise. Fix comment. 1999-06-13 Andreas Schwab --- sysdeps/generic/strchr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sysdeps/generic/strchr.c') diff --git a/sysdeps/generic/strchr.c b/sysdeps/generic/strchr.c index 7c1eb9578a..11039063d5 100644 --- a/sysdeps/generic/strchr.c +++ b/sysdeps/generic/strchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 93, 94, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 93, 94, 95, 96, 97, 99 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and bug fix and commentary by Jim Blandy (jimb@ai.mit.edu); @@ -21,20 +21,22 @@ Boston, MA 02111-1307, USA. */ #include +#include #undef strchr /* Find the first occurrence of C in S. */ char * -strchr (s, c) +strchr (s, c_in) const char *s; - int c; + int c_in; { const unsigned char *char_ptr; const unsigned long int *longword_ptr; unsigned long int longword, magic_bits, charmask; + unsigned reg_char c; - c = (unsigned char) c; + c = (unsigned char) c_in; /* Handle the first few characters by reading one character at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ -- cgit v1.2.3