mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Use gtk_ascii_tolower/toupper instead of the C library variants. (#488918,
2007-10-22 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbuilder.c: Use gtk_ascii_tolower/toupper instead of the C library variants. (#488918, Sertaç Ö. Yıldız) svn path=/trunk/; revision=18939
This commit is contained in:
parent
fd6f1ac196
commit
1f36660d8d
@ -1,3 +1,8 @@
|
||||
2007-10-22 Johan Dahlin <jdahlin@async.com.br>
|
||||
|
||||
* gtk/gtkbuilder.c: Use gtk_ascii_tolower/toupper instead of the C
|
||||
library variants. (#488918, Sertaç Ö. Yıldız)
|
||||
|
||||
2007-10-19 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Add a block
|
||||
|
@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <ctype.h> /* tolower, toupper */
|
||||
#include <errno.h> /* errno */
|
||||
#include <stdlib.h> /* strtol, strtoul */
|
||||
#include <string.h> /* strlen */
|
||||
@ -210,13 +209,13 @@ _gtk_builder_resolve_type_lazily (const gchar *name)
|
||||
{
|
||||
c = name[i];
|
||||
/* skip if uppercase, first or previous is uppercase */
|
||||
if ((c == toupper (c) &&
|
||||
i > 0 && name[i-1] != toupper (name[i-1])) ||
|
||||
(i > 2 && name[i] == toupper (name[i]) &&
|
||||
name[i-1] == toupper (name[i-1]) &&
|
||||
name[i-2] == toupper (name[i-2])))
|
||||
if ((c == g_ascii_toupper (c) &&
|
||||
i > 0 && name[i-1] != g_ascii_toupper (name[i-1])) ||
|
||||
(i > 2 && name[i] == g_ascii_toupper (name[i]) &&
|
||||
name[i-1] == g_ascii_toupper (name[i-1]) &&
|
||||
name[i-2] == g_ascii_toupper (name[i-2])))
|
||||
g_string_append_c (symbol_name, '_');
|
||||
g_string_append_c (symbol_name, tolower (c));
|
||||
g_string_append_c (symbol_name, g_ascii_tolower (c));
|
||||
}
|
||||
g_string_append (symbol_name, "_get_type");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user