New. (skip_spaces): g_unichar_isspace -> xml_isspace isspace ->
authorDarin Adler <darin@src.gnome.org>
Sun, 10 Feb 2002 05:56:06 +0000 (05:56 +0000)
committerDarin Adler <darin@src.gnome.org>
Sun, 10 Feb 2002 05:56:06 +0000 (05:56 +0000)
* 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

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gmarkup.c
glib/gstrfuncs.c

index 2a100e4..3ebbf3e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-02-09  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <matthias@local>
 
        * tests/markups/valid-4.gmarkup: Test attribute value delimiters.
index 2a100e4..3ebbf3e 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-09  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <matthias@local>
 
        * tests/markups/valid-4.gmarkup: Test attribute value delimiters.
index 2a100e4..3ebbf3e 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-09  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <matthias@local>
 
        * tests/markups/valid-4.gmarkup: Test attribute value delimiters.
index 2a100e4..3ebbf3e 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-09  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <matthias@local>
 
        * tests/markups/valid-4.gmarkup: Test attribute value delimiters.
index 2a100e4..3ebbf3e 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-09  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <matthias@local>
 
        * tests/markups/valid-4.gmarkup: Test attribute value delimiters.
index 2a100e4..3ebbf3e 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-09  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <matthias@local>
 
        * tests/markups/valid-4.gmarkup: Test attribute value delimiters.
index 2a100e4..3ebbf3e 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-09  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <matthias@local>
 
        * tests/markups/valid-4.gmarkup: Test attribute value delimiters.
index 2a100e4..3ebbf3e 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-09  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <matthias@local>
 
        * tests/markups/valid-4.gmarkup: Test attribute value delimiters.
index 4386b04..3b8da5e 100644 (file)
@@ -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));
index 704d14a..6469618 100644 (file)
@@ -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;
            }