diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-12 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 6 | ||||
-rw-r--r-- | glib/guniprop.c | 25 | ||||
-rw-r--r-- | guniprop.c | 25 |
10 files changed, 82 insertions, 16 deletions
@@ -1,3 +1,9 @@ +2000-11-16 Havoc Pennington <hp@redhat.com> + + * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps + the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, + so don't special case it. + 2000-11-17 Tor Lillqvist <tml@iki.fi> * glib.def: Add g_trash_stack entry points. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f0cd3ce44..c01c529f7 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2000-11-16 Havoc Pennington <hp@redhat.com> + + * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps + the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, + so don't special case it. + 2000-11-17 Tor Lillqvist <tml@iki.fi> * glib.def: Add g_trash_stack entry points. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f0cd3ce44..c01c529f7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2000-11-16 Havoc Pennington <hp@redhat.com> + + * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps + the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, + so don't special case it. + 2000-11-17 Tor Lillqvist <tml@iki.fi> * glib.def: Add g_trash_stack entry points. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index f0cd3ce44..c01c529f7 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2000-11-16 Havoc Pennington <hp@redhat.com> + + * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps + the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, + so don't special case it. + 2000-11-17 Tor Lillqvist <tml@iki.fi> * glib.def: Add g_trash_stack entry points. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f0cd3ce44..c01c529f7 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2000-11-16 Havoc Pennington <hp@redhat.com> + + * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps + the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, + so don't special case it. + 2000-11-17 Tor Lillqvist <tml@iki.fi> * glib.def: Add g_trash_stack entry points. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f0cd3ce44..c01c529f7 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2000-11-16 Havoc Pennington <hp@redhat.com> + + * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps + the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, + so don't special case it. + 2000-11-17 Tor Lillqvist <tml@iki.fi> * glib.def: Add g_trash_stack entry points. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f0cd3ce44..c01c529f7 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2000-11-16 Havoc Pennington <hp@redhat.com> + + * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps + the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, + so don't special case it. + 2000-11-17 Tor Lillqvist <tml@iki.fi> * glib.def: Add g_trash_stack entry points. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f0cd3ce44..c01c529f7 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2000-11-16 Havoc Pennington <hp@redhat.com> + + * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps + the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, + so don't special case it. + 2000-11-17 Tor Lillqvist <tml@iki.fi> * glib.def: Add g_trash_stack entry points. diff --git a/glib/guniprop.c b/glib/guniprop.c index c45fc7ab8..8a1b41d69 100644 --- a/glib/guniprop.c +++ b/glib/guniprop.c @@ -118,15 +118,24 @@ g_unichar_ispunct (gunichar c) gboolean g_unichar_isspace (gunichar c) { - /* special-case these since Unicode thinks they are not spaces */ - if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || - c == '\f' || c == '\v') /* "the mythical vertical tab" */ - return TRUE; - else + switch (c) { - int t = TYPE (c); - return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR - || t == G_UNICODE_PARAGRAPH_SEPARATOR); + /* special-case these since Unicode thinks they are not spaces */ + case '\t': + case '\n': + case '\r': + case '\f': + case '\v': /* vertical tab - as if anyone has ever used this... */ + return TRUE; + break; + + default: + { + int t = TYPE (c); + return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR + || t == G_UNICODE_PARAGRAPH_SEPARATOR); + } + break; } } diff --git a/guniprop.c b/guniprop.c index c45fc7ab8..8a1b41d69 100644 --- a/guniprop.c +++ b/guniprop.c @@ -118,15 +118,24 @@ g_unichar_ispunct (gunichar c) gboolean g_unichar_isspace (gunichar c) { - /* special-case these since Unicode thinks they are not spaces */ - if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || - c == '\f' || c == '\v') /* "the mythical vertical tab" */ - return TRUE; - else + switch (c) { - int t = TYPE (c); - return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR - || t == G_UNICODE_PARAGRAPH_SEPARATOR); + /* special-case these since Unicode thinks they are not spaces */ + case '\t': + case '\n': + case '\r': + case '\f': + case '\v': /* vertical tab - as if anyone has ever used this... */ + return TRUE; + break; + + default: + { + int t = TYPE (c); + return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR + || t == G_UNICODE_PARAGRAPH_SEPARATOR); + } + break; } } |