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
This commit is contained in:
Darin Adler 2002-02-10 05:56:06 +00:00
parent b08db9f35e
commit e507791c85
10 changed files with 71 additions and 9 deletions

View 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.

View 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.

View 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.

View 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.

View 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.

View 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.

View 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.

View 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.

View 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));

View 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;
}