1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

Unbroke on -current: don't prototype/implement strnstr(3) - this function

is already in libc.
This commit is contained in:
Maxim Sobolev 2001-12-19 14:43:59 +00:00
parent 91f8efdede
commit 21e04a0b9b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=51842
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,26 @@
$FreeBSD$
--- eperl_parse.c 2001/12/19 14:40:20 1.1
+++ eperl_parse.c 2001/12/19 14:40:33
@@ -298,20 +298,6 @@
return NULL;
}
-char *strnstr(char *buf, char *str, int n)
-{
- char *cp;
- char *cpe;
- int len;
-
- len = strlen(str);
- for (cp = buf, cpe = buf+n-len; cp <= cpe; cp++) {
- if (strncmp(cp, str, len) == 0)
- return cp;
- }
- return NULL;
-}
-
char *strncasestr(char *buf, char *str, int n)
{
char *cp;

View File

@ -0,0 +1,13 @@
$FreeBSD$
--- eperl_proto.h 2001/12/19 14:37:46 1.1
+++ eperl_proto.h 2001/12/19 14:39:24
@@ -79,7 +79,6 @@
extern char *ePerl_Efwrite(char *cpBuf, int nBuf, int cNum, char *cpOut);
extern char *ePerl_Cfwrite(char *cpBuf, int nBuf, int cNum, char *cpOut);
extern char *strnchr(char *buf, char chr, int n);
-extern char *strnstr(char *buf, char *str, int n);
extern char *strncasestr(char *buf, char *str, int n);
extern char *strndup(char *buf, int n);
extern char *ePerl_Bristled2Plain(char *cpBuf);