From: Darin Adler Date: Sun, 10 Feb 2002 05:56:06 +0000 (+0000) Subject: New. (skip_spaces): g_unichar_isspace -> xml_isspace isspace -> X-Git-Tag: GLIB_1_3_14~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e507791c85046c9faeef686dc1d313d172cac4d2;p=platform%2Fupstream%2Fglib.git New. (skip_spaces): g_unichar_isspace -> xml_isspace isspace -> * glib/gmarkup.c: (xml_isspace): New. (skip_spaces): g_unichar_isspace -> xml_isspace * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit --- diff --git a/ChangeLog b/ChangeLog index 2a100e4..3ebbf3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-02-09 Darin Adler + + * glib/gmarkup.c: (xml_isspace): New. + (skip_spaces): g_unichar_isspace -> xml_isspace + * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace + isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit + 2002-02-09 Matthias Clasen * tests/markups/valid-4.gmarkup: Test attribute value delimiters. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 2a100e4..3ebbf3e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +2002-02-09 Darin Adler + + * glib/gmarkup.c: (xml_isspace): New. + (skip_spaces): g_unichar_isspace -> xml_isspace + * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace + isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit + 2002-02-09 Matthias Clasen * tests/markups/valid-4.gmarkup: Test attribute value delimiters. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2a100e4..3ebbf3e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2002-02-09 Darin Adler + + * glib/gmarkup.c: (xml_isspace): New. + (skip_spaces): g_unichar_isspace -> xml_isspace + * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace + isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit + 2002-02-09 Matthias Clasen * tests/markups/valid-4.gmarkup: Test attribute value delimiters. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 2a100e4..3ebbf3e 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +2002-02-09 Darin Adler + + * glib/gmarkup.c: (xml_isspace): New. + (skip_spaces): g_unichar_isspace -> xml_isspace + * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace + isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit + 2002-02-09 Matthias Clasen * tests/markups/valid-4.gmarkup: Test attribute value delimiters. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 2a100e4..3ebbf3e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +2002-02-09 Darin Adler + + * glib/gmarkup.c: (xml_isspace): New. + (skip_spaces): g_unichar_isspace -> xml_isspace + * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace + isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit + 2002-02-09 Matthias Clasen * tests/markups/valid-4.gmarkup: Test attribute value delimiters. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 2a100e4..3ebbf3e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +2002-02-09 Darin Adler + + * glib/gmarkup.c: (xml_isspace): New. + (skip_spaces): g_unichar_isspace -> xml_isspace + * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace + isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit + 2002-02-09 Matthias Clasen * tests/markups/valid-4.gmarkup: Test attribute value delimiters. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2a100e4..3ebbf3e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +2002-02-09 Darin Adler + + * glib/gmarkup.c: (xml_isspace): New. + (skip_spaces): g_unichar_isspace -> xml_isspace + * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace + isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit + 2002-02-09 Matthias Clasen * tests/markups/valid-4.gmarkup: Test attribute value delimiters. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2a100e4..3ebbf3e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2002-02-09 Darin Adler + + * glib/gmarkup.c: (xml_isspace): New. + (skip_spaces): g_unichar_isspace -> xml_isspace + * glib/gstrfuncs.c: (g_ascii_strtod): isspace -> g_ascii_isspace + isxdigit -> g_ascii_isxdigit, isdigit -> g_ascii_isdigit + 2002-02-09 Matthias Clasen * tests/markups/valid-4.gmarkup: Test attribute value delimiters. diff --git a/glib/gmarkup.c b/glib/gmarkup.c index 4386b04..3b8da5e 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -28,7 +28,7 @@ #include "glibintl.h" GQuark -g_markup_error_quark () +g_markup_error_quark (void) { static GQuark error_quark = 0; @@ -624,12 +624,18 @@ advance_char (GMarkupParseContext *context) return context->iter != context->current_text_end; } +static gboolean +xml_isspace (char c) +{ + return c == ' ' || c == '\t' || c == '\n' || c == '\r'; +} + static void skip_spaces (GMarkupParseContext *context) { do { - if (!g_unichar_isspace (g_utf8_get_char (context->iter))) + if (!xml_isspace (*context->iter)) return; } while (advance_char (context)); diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index 704d14a..6469618 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -365,7 +365,7 @@ g_ascii_strtod (const gchar *nptr, { p = nptr; /* Skip leading space */ - while (isspace ((guchar)*p)) + while (g_ascii_isspace (*p)) p++; /* Skip leading optional sign */ @@ -378,42 +378,42 @@ g_ascii_strtod (const gchar *nptr, p += 2; /* HEX - find the (optional) decimal point */ - while (isxdigit ((guchar)*p)) + while (g_ascii_isxdigit (*p)) p++; if (*p == '.') { decimal_point_pos = p++; - while (isxdigit ((guchar)*p)) + while (g_ascii_isxdigit (*p)) p++; if (*p == 'p' || *p == 'P') p++; if (*p == '+' || *p == '-') p++; - while (isdigit ((guchar)*p)) + while (g_ascii_isdigit (*p)) p++; end = p; } } else { - while (isdigit ((guchar)*p)) + while (g_ascii_isdigit (*p)) p++; if (*p == '.') { decimal_point_pos = p++; - while (isdigit ((guchar)*p)) + while (g_ascii_isdigit (*p)) p++; if (*p == 'e' || *p == 'E') p++; if (*p == '+' || *p == '-') p++; - while (isdigit ((guchar)*p)) + while (g_ascii_isdigit (*p)) p++; end = p; }