Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: Makefile.am emodule.c finders.c lang.c menus-misc.c util.h Added Files: string.c Log Message: Provide strcase functions if not available. =================================================================== RCS file: /cvs/e/e16/e/src/Makefile.am,v retrieving revision 1.103 retrieving revision 1.104 diff -u -3 -r1.103 -r1.104 --- Makefile.am 28 Jun 2008 19:08:35 -0000 1.103 +++ Makefile.am 14 Aug 2008 18:44:23 -0000 1.104 @@ -94,6 +94,7 @@ sound.c sound.h \ stacking.c \ startup.c \ + string.c \ systray.c \ tclass.c tclass.h \ text.c \ =================================================================== RCS file: /cvs/e/e16/e/src/emodule.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- emodule.c 22 Mar 2008 15:00:07 -0000 1.10 +++ emodule.c 14 Aug 2008 18:44:23 -0000 1.11 @@ -53,7 +53,7 @@ for (i = 0; i < n_modules; i++) { pm = p_modules[i]; - if (!strncasecmp(name, pm->name, 4) || + if (!strncmp(name, pm->name, 4) || (pm->nick && !strcmp(name, pm->nick))) return pm; } =================================================================== RCS file: /cvs/e/e16/e/src/finders.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- finders.c 10 May 2008 23:22:31 -0000 1.57 +++ finders.c 14 Aug 2008 18:44:23 -0000 1.58 @@ -25,6 +25,7 @@ #include "borders.h" #include "ewins.h" #include "groups.h" +#include "util.h" #include <ctype.h> #include <string.h> @@ -173,7 +174,7 @@ name = EwinGetIcccmName(ewin); if (!name) continue; - if (!strcasestr(name, match)) + if (!Estrcasestr(name, match)) continue; } nfound++; =================================================================== RCS file: /cvs/e/e16/e/src/lang.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- lang.c 26 Jun 2008 21:59:23 -0000 1.27 +++ lang.c 14 Aug 2008 18:44:23 -0000 1.28 @@ -386,9 +386,9 @@ enc_loc, enc_int, MB_CUR_MAX); } - if (!strcasecmp(enc_loc, "utf8") || !strcasecmp(enc_loc, "utf-8")) + if (!Estrcasecmp(enc_loc, "utf8") || !Estrcasecmp(enc_loc, "utf-8")) Mode.locale.utf8_loc = 1; - if (!strcasecmp(enc_int, "utf8") || !strcasecmp(enc_int, "utf-8")) + if (!Estrcasecmp(enc_int, "utf8") || !Estrcasecmp(enc_int, "utf-8")) Mode.locale.utf8_int = 1; #if HAVE_ICONV =================================================================== RCS file: /cvs/e/e16/e/src/menus-misc.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -3 -r1.49 -r1.50 --- menus-misc.c 16 Jun 2008 21:24:02 -0000 1.49 +++ menus-misc.c 14 Aug 2008 18:44:23 -0000 1.50 @@ -851,7 +851,7 @@ int i; for (i = 0; exts[i]; i++) - if (!strcasecmp(exts[i], ext)) + if (!Estrcasecmp(exts[i], ext)) return 1; return 0; =================================================================== RCS file: /cvs/e/e16/e/src/util.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- util.h 7 Aug 2008 23:14:54 -0000 1.18 +++ util.h 14 Aug 2008 18:44:23 -0000 1.19 @@ -59,11 +59,15 @@ #define USE_LIBC_STRNDUP 1 /* Use libc strndup if present */ #endif -#ifndef HAVE_STRCASESTR -#define strcasestr(haystack, needle) strstr(haystack, needle) +#ifdef HAVE_STRCASECMP +#define Estrcasecmp(s1, s2) strcasecmp(s1, s2) +#else +int Estrcasecmp(const char *s1, const char *s2); #endif -#ifndef HAVE_STRCASECMP -#define strcasecmp(s1, s2) strcmp(s1, s2) +#ifdef HAVE_STRCASESTR +#define Estrcasestr(haystack, needle) strcasestr(haystack, needle) +#else +const char *Estrcasestr(const char *haystack, const char *needle); #endif /* memory.c */ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs