version 1.17 | | version 1.18 |
---|
| | |
/* | | /* |
* static char *rcsid_porting_c = | | * static char *rcsid_porting_c = |
* "$Id: porting.c,v 1.17 2002/12/03 07:40:10 mwedel Exp $"; | | * "$Id: porting.c,v 1.18 2003/02/04 06:26:06 garbled Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} | | } |
#endif | | #endif |
| | |
| | char *strcasestr_local(const char *s, char *find) |
| | { |
| | char c, sc; |
| | size_t len; |
| | |
| | if ((c = *find++) != 0) { |
| | c = tolower(c); |
| | len = strlen(find); |
| | do { |
| | do { |
| | if ((sc = *s++) == 0) |
| | return NULL; |
| | } while (tolower(sc) != c); |
| | } while (strncasecmp(s, find, len) != 0); |
| | s--; |
| | } |
| | return (char *)s; |
| | } |
| | |
#if !defined(HAVE_SNPRINTF) | | #if !defined(HAVE_SNPRINTF) |
| | |
int snprintf(char *dest, int max, const char *format, ...) | | int snprintf(char *dest, int max, const char *format, ...) |