| 155 | |
| 156 | #ifndef HAVE_STRCASESTR |
| 157 | char * strcasestr (const char *haystack, const char *needle) |
| 158 | { |
| 159 | const char *p, *startn = NULL, *np = NULL; |
| 160 | for (p = haystack; *p; p++) |
| 161 | { |
| 162 | if (np) |
| 163 | { |
| 164 | if (toupper(*p) == toupper(*np)) |
| 165 | { |
| 166 | if (!*++np) |
| 167 | return startn; |
| 168 | } |
| 169 | else |
| 170 | np = NULL; |
| 171 | } |
| 172 | else if (toupper(*p) == toupper(*needle)) |
| 173 | { |
| 174 | np = needle + 1; |
| 175 | startn = p; |
| 176 | } |
| 177 | } |
| 178 | return NULL; |
| 179 | } |
| 180 | #endif |
| 181 | |
| 182 | #if ! defined(HAVE_LOCALTIME_R) && ! defined(__MINGW32__) && !defined(DISABLED_FOR_FRAMAC) |
no outgoing calls
no test coverage detected