X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrstr.c;h=dd4622297a2559b5cb3b136d534c07c278cdeaa3;hb=dae1457672e2638b0ed8a2f5c4634a30fa86553d;hp=b16799a2e6486f4bfd94749474cdf5afe3889735;hpb=cf42d3e5e80be6bf7093a3ca9be0d04033eaf527;p=gnulib.git diff --git a/lib/strstr.c b/lib/strstr.c index b16799a2e..dd4622297 100644 --- a/lib/strstr.c +++ b/lib/strstr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1999, 2002-2003 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify @@ -24,11 +24,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ * * Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */ +#if HAVE_CONFIG_H +# include +#endif + #include -#include typedef unsigned chartype; +#undef strstr + char * strstr (const char *phaystack, const char *pneedle) { @@ -71,7 +76,7 @@ strstr (const char *phaystack, const char *pneedle) a = *++haystack; if (a == '\0') goto ret0; -shloop: } +shloop:; } while (a != b); jin: a = *++haystack; @@ -101,7 +106,7 @@ jin: a = *++haystack; } while (*rhaystack == a); - needle = rneedle; /* took the register-poor aproach */ + needle = rneedle; /* took the register-poor approach */ if (a == '\0') break;