projects
/
dosdemo
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
zbuffer done
[dosdemo]
/
libs
/
mikmod
/
posix
/
strstr.c
1
#ifdef HAVE_CONFIG_H
2
#include "config.h"
3
#endif
4
5
#include <string.h>
6
7
char *strstr(const char *haystack, const char *needle)
8
{
9
const char *scan;
10
size_t len;
11
char firstc;
12
13
firstc = *needle;
14
len = strlen(needle);
15
for (scan = haystack; *scan != firstc || strncmp(scan, needle, len); )
16
if (!*scan++)
17
return NULL;
18
return (char *)scan;
19
}