From c9fa92954b1c6363d16be1e8b904c2aac7acebe5 Mon Sep 17 00:00:00 2001 From: kcwu Date: Fri, 4 Jun 2004 05:10:20 +0000 Subject: strcasestr() is OS dependent function git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2052 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 15 --------------- mbbsd/osdep.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/edit.c b/mbbsd/edit.c index e420b584..d8c7d80f 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1182,21 +1182,6 @@ goto_line(int lino) redraw_everything = YEA; } -char * -strcasestr(const char *big, const char *little) -{ - char *ans = (char *)big; - int len = strlen(little); - char *endptr = (char *)big + strlen(big) - len; - - while (ans <= endptr) - if (!strncasecmp(ans, little, len)) - return ans; - else - ans++; - return 0; -} - /* * mode: 0: prompt 1: forward -1: backward */ diff --git a/mbbsd/osdep.c b/mbbsd/osdep.c index 4e6d286e..73af3f85 100644 --- a/mbbsd/osdep.c +++ b/mbbsd/osdep.c @@ -139,6 +139,21 @@ size_t strlcpy(dst, src, siz) return(s - src - 1); /* count does not include NUL */ } +char * +strcasestr(const char *big, const char *little) +{ + char *ans = (char *)big; + int len = strlen(little); + char *endptr = (char *)big + strlen(big) - len; + + while (ans <= endptr) + if (!strncasecmp(ans, little, len)) + return ans; + else + ans++; + return 0; +} + #endif #if __FreeBSD__ -- cgit v1.2.3