X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrstr.c;h=f1e2ef698887aa8be5aae354a148e4ba105c18ed;hb=c5ce79f4c514b37b5756e85530112d778cff302a;hp=5bd7cb4658890734141a59c4e4f791f743b52876;hpb=103b7cd6e6cc45a5aa570ad8c4d0aa6b0188b602;p=gnulib.git diff --git a/lib/strstr.c b/lib/strstr.c index 5bd7cb465..f1e2ef698 100644 --- a/lib/strstr.c +++ b/lib/strstr.c @@ -1,5 +1,5 @@ /* Searching in a string. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005-2006 Free Software Foundation, Inc. Written by Bruno Haible , 2005. This program is free software; you can redistribute it and/or modify @@ -16,13 +16,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#if HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ #include "strstr.h" +#include /* for NULL */ + #if HAVE_MBRTOWC # include "mbuiter.h" #endif @@ -71,7 +71,7 @@ strstr (const char *haystack, const char *needle) { if (!mbui_avail (rneedle)) /* Found a match. */ - return (char *) haystack; + return (char *) mbui_cur_ptr (iter_haystack); if (!mbui_avail (rhaystack)) /* No match. */ return NULL;