* bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
[deliverable/binutils-gdb.git] / libiberty / strstr.c
index fab36e3fb3d4e1c534890ad04b34f1f5b5fd02a6..a059c7f5dcb3b3d6c17efc26566bd5c412d5dc37 100644 (file)
@@ -3,24 +3,16 @@
 
 /*
 
-NAME
+@deftypefn Supplemental char* strstr (const char *@var{string}, const char *@var{sub})
 
-       strstr -- locate first occurance of a substring
+This function searches for the substring @var{sub} in the string
+@var{string}, not including the terminating null characters.  A pointer
+to the first occurrence of @var{sub} is returned, or @code{NULL} if the
+substring is absent.  If @var{sub} points to a string with zero
+length, the function returns @var{string}.
 
-SYNOPSIS
+@end deftypefn
 
-       #include <string.h>
-
-       char *strstr (char *s1, char *s2)
-
-DESCRIPTION
-
-       Locates the first occurance in the string pointed to by S1 of
-       the string pointed to by S2.  Returns a pointer to the substring
-       found, or a NULL pointer if not found.  If S2 points to a string
-       with zero length, the function returns S1.
-       
-BUGS
 
 */
 
@@ -35,8 +27,8 @@ strstr (s1, s2)
   register char *p = s1;
   extern char *strchr ();
   extern int strncmp ();
-#if __GNUC__==2
-  extern __SIZE_TYPE__ strlen ();
+#if __GNUC__ >= 2
+  extern __SIZE_TYPE__ strlen (const char *);
 #endif
   register int len = strlen (s2);
 
This page took 0.035004 seconds and 4 git commands to generate.