From: Kalle Wallin Date: Mon, 22 Mar 2004 19:37:17 +0000 (+0000) Subject: Added an implementation of strcasecmp for non glibc systems. X-Git-Tag: v0.12_alpha1~670 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=740715e48c06d79963bb192292cb802f02a03a4d;p=ncmpc.git Added an implementation of strcasecmp for non glibc systems. git-svn-id: https://svn.musicpd.org/ncmpc/trunk@378 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/support.c b/support.c index 15f084c..28297e4 100644 --- a/support.c +++ b/support.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -34,8 +35,6 @@ iconv_t iconv_to_uft8 = (iconv_t)(-1); #endif -#ifndef HAVE_LIBGEN_H - char * remove_trailing_slash(char *path) { @@ -51,7 +50,25 @@ remove_trailing_slash(char *path) return path; } +char * +lowerstr(char *str) +{ + size_t i; + size_t len = strlen(str); + if( str==NULL ) + return NULL; + + i=0; + while(i -#else +#endif + + +#ifndef HAVE_BASENAME char *basename(char *path); #endif +#ifndef HAVE_STRCASESTR +char *strcasestr(const char *haystack, const char *needle); +#endif + +char *remove_trailing_slash(char *path); +char *lowerstr(char *str); int charset_init(void);