mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-20 17:22:11 +01:00
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:
parent
b08db9f35e
commit
e507791c85
@ -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>
|
2002-02-09 Matthias Clasen <matthias@local>
|
||||||
|
|
||||||
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
||||||
|
@ -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>
|
2002-02-09 Matthias Clasen <matthias@local>
|
||||||
|
|
||||||
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
||||||
|
@ -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>
|
2002-02-09 Matthias Clasen <matthias@local>
|
||||||
|
|
||||||
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
||||||
|
@ -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>
|
2002-02-09 Matthias Clasen <matthias@local>
|
||||||
|
|
||||||
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
||||||
|
@ -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>
|
2002-02-09 Matthias Clasen <matthias@local>
|
||||||
|
|
||||||
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
||||||
|
@ -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>
|
2002-02-09 Matthias Clasen <matthias@local>
|
||||||
|
|
||||||
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
||||||
|
@ -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>
|
2002-02-09 Matthias Clasen <matthias@local>
|
||||||
|
|
||||||
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
||||||
|
@ -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>
|
2002-02-09 Matthias Clasen <matthias@local>
|
||||||
|
|
||||||
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "glibintl.h"
|
#include "glibintl.h"
|
||||||
|
|
||||||
GQuark
|
GQuark
|
||||||
g_markup_error_quark ()
|
g_markup_error_quark (void)
|
||||||
{
|
{
|
||||||
static GQuark error_quark = 0;
|
static GQuark error_quark = 0;
|
||||||
|
|
||||||
@ -624,12 +624,18 @@ advance_char (GMarkupParseContext *context)
|
|||||||
return context->iter != context->current_text_end;
|
return context->iter != context->current_text_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
xml_isspace (char c)
|
||||||
|
{
|
||||||
|
return c == ' ' || c == '\t' || c == '\n' || c == '\r';
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
skip_spaces (GMarkupParseContext *context)
|
skip_spaces (GMarkupParseContext *context)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (!g_unichar_isspace (g_utf8_get_char (context->iter)))
|
if (!xml_isspace (*context->iter))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while (advance_char (context));
|
while (advance_char (context));
|
||||||
|
@ -365,7 +365,7 @@ g_ascii_strtod (const gchar *nptr,
|
|||||||
{
|
{
|
||||||
p = nptr;
|
p = nptr;
|
||||||
/* Skip leading space */
|
/* Skip leading space */
|
||||||
while (isspace ((guchar)*p))
|
while (g_ascii_isspace (*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
/* Skip leading optional sign */
|
/* Skip leading optional sign */
|
||||||
@ -378,42 +378,42 @@ g_ascii_strtod (const gchar *nptr,
|
|||||||
p += 2;
|
p += 2;
|
||||||
/* HEX - find the (optional) decimal point */
|
/* HEX - find the (optional) decimal point */
|
||||||
|
|
||||||
while (isxdigit ((guchar)*p))
|
while (g_ascii_isxdigit (*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if (*p == '.')
|
if (*p == '.')
|
||||||
{
|
{
|
||||||
decimal_point_pos = p++;
|
decimal_point_pos = p++;
|
||||||
|
|
||||||
while (isxdigit ((guchar)*p))
|
while (g_ascii_isxdigit (*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if (*p == 'p' || *p == 'P')
|
if (*p == 'p' || *p == 'P')
|
||||||
p++;
|
p++;
|
||||||
if (*p == '+' || *p == '-')
|
if (*p == '+' || *p == '-')
|
||||||
p++;
|
p++;
|
||||||
while (isdigit ((guchar)*p))
|
while (g_ascii_isdigit (*p))
|
||||||
p++;
|
p++;
|
||||||
end = p;
|
end = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (isdigit ((guchar)*p))
|
while (g_ascii_isdigit (*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if (*p == '.')
|
if (*p == '.')
|
||||||
{
|
{
|
||||||
decimal_point_pos = p++;
|
decimal_point_pos = p++;
|
||||||
|
|
||||||
while (isdigit ((guchar)*p))
|
while (g_ascii_isdigit (*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if (*p == 'e' || *p == 'E')
|
if (*p == 'e' || *p == 'E')
|
||||||
p++;
|
p++;
|
||||||
if (*p == '+' || *p == '-')
|
if (*p == '+' || *p == '-')
|
||||||
p++;
|
p++;
|
||||||
while (isdigit ((guchar)*p))
|
while (g_ascii_isdigit (*p))
|
||||||
p++;
|
p++;
|
||||||
end = p;
|
end = p;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user