Use GLib variant of strcasecmp()

The GLib version of strcasecmp() ignores any non-ASCII character,
unlike the original which is locale-dependent.
This commit is contained in:
Emmanuele Bassi 2009-05-25 12:42:17 +01:00
parent ec374c7ab9
commit b05d4be19d
2 changed files with 3 additions and 3 deletions

View File

@ -219,7 +219,7 @@ clutter_backend_glx_constructor (GType gtype,
static gboolean static gboolean
check_vblank_env (const char *name) check_vblank_env (const char *name)
{ {
if (clutter_vblank_name && !strcasecmp(clutter_vblank_name, name)) if (clutter_vblank_name && !g_ascii_strcasecmp (clutter_vblank_name, name))
return TRUE; return TRUE;
return FALSE; return FALSE;

View File

@ -214,9 +214,9 @@ clutter_glx_texture_pixmap_init (ClutterGLXTexturePixmap *self)
if ((rect_env = g_getenv ("CLUTTER_PIXMAP_TEXTURE_RECTANGLE"))) if ((rect_env = g_getenv ("CLUTTER_PIXMAP_TEXTURE_RECTANGLE")))
{ {
if (strcasecmp (rect_env, "force") == 0) if (g_ascii_strcasecmp (rect_env, "force") == 0)
_rectangle_state = CLUTTER_GLX_RECTANGLE_FORCE; _rectangle_state = CLUTTER_GLX_RECTANGLE_FORCE;
else if (strcasecmp (rect_env, "disable") == 0) else if (g_ascii_strcasecmp (rect_env, "disable") == 0)
_rectangle_state = CLUTTER_GLX_RECTANGLE_DISALLOW; _rectangle_state = CLUTTER_GLX_RECTANGLE_DISALLOW;
else if (rect_env[0]) else if (rect_env[0])
g_warning ("Unknown value for CLUTTER_PIXMAP_TEXTURE_RECTANGLE, " g_warning ("Unknown value for CLUTTER_PIXMAP_TEXTURE_RECTANGLE, "