Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/* $XConsortium: strstr.c /main/3 1995/11/08 11:07:59 rswiston $ */
char *strstr ( s1, s2 )
char *s1, *s2 ; {
int x, y ;
y = strlen ( s2 ) ;
x = strlen ( s1 ) - y ;
if ( x < 0 ) return ( ( char * ) 0L ) ;
do {
if ( strncmp ( s1 + x, s2, y ) == 0 ) return ( s1 + x ) ;
}
while ( --x >= 0 ) ;
return ( ( char * ) 0L ) ;
}