summaryrefslogtreecommitdiff
path: root/pango/pango-markup.c
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2002-02-10 05:53:40 +0000
committerDarin Adler <darin@src.gnome.org>2002-02-10 05:53:40 +0000
commit62e165c75f6efad45c3ab2d74b6684558ce3d583 (patch)
tree2e91265cf8265da5a1a818f1d7599c4a1b785fb7 /pango/pango-markup.c
parent086c5d631cc7949d152415505012c88cce1c9ec8 (diff)
downloadpango-62e165c75f6efad45c3ab2d74b6684558ce3d583.tar.gz
isspace -> g_ascii_isspace (pango_font_description_from_string): isspace
* pango/fonts.c: (getword): isspace -> g_ascii_isspace (pango_font_description_from_string): isspace -> g_ascii_isspace * pango/modules.c: Remove unneeded <ctype.h> include. * pango/pango-markup.c: (xml_isspace): New. (pango_parse_markup): isspace -> xml_isspace (span_parse_func): isdigit -> g_ascii_isdigit * pango/pango-utils.c: (pango_trim_string): isspace -> g_ascii_isspace (pango_skip_space): isspace -> g_ascii_isspace (pango_scan_word): isspace -> g_ascii_isspace (pango_scan_string): isspace -> g_ascii_isspace (pango_scan_int): isspace -> g_ascii_isspace * pango/pangoft2-fontmap.c: Remove unneeded <ctype.h> include. * pango/pangox-fontmap.c: Remove unneeded <ctype.h> include.
Diffstat (limited to 'pango/pango-markup.c')
-rw-r--r--pango/pango-markup.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index b57ee136..b2814468 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -22,7 +22,6 @@
#include <string.h>
#include <stdlib.h>
#include <errno.h>
-#include <ctype.h>
#include <pango/pango-attributes.h>
#include <pango/pango-font.h>
@@ -534,6 +533,12 @@ text_handler (GMarkupParseContext *context,
}
}
+static gboolean
+xml_isspace (char c)
+{
+ return c == ' ' || c == '\t' || c == '\n' || c == '\r';
+}
+
static GMarkupParser pango_markup_parser = {
start_element_handler,
end_element_handler,
@@ -614,7 +619,7 @@ pango_parse_markup (const char *markup_text,
p = markup_text;
end = markup_text + length;
- while (p != end && isspace (*p))
+ while (p != end && xml_isspace (*p))
++p;
if (end - p >= 8 && strncmp (p, "<markup>", 8) == 0)
@@ -955,7 +960,7 @@ span_parse_func (MarkupData *md,
if (size)
{
- if (isdigit (*size))
+ if (g_ascii_isdigit (*size))
{
char *end = NULL;
gulong n;