From 62e165c75f6efad45c3ab2d74b6684558ce3d583 Mon Sep 17 00:00:00 2001 From: Darin Adler Date: Sun, 10 Feb 2002 05:53:40 +0000 Subject: 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 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 include. * pango/pangox-fontmap.c: Remove unneeded include. --- ChangeLog | 16 ++++++++++++++++ ChangeLog.pre-1-0 | 16 ++++++++++++++++ ChangeLog.pre-1-10 | 16 ++++++++++++++++ ChangeLog.pre-1-2 | 16 ++++++++++++++++ ChangeLog.pre-1-4 | 16 ++++++++++++++++ ChangeLog.pre-1-6 | 16 ++++++++++++++++ ChangeLog.pre-1-8 | 16 ++++++++++++++++ pango/fonts.c | 11 +++++------ pango/modules.c | 1 - pango/pango-markup.c | 11 ++++++++--- pango/pango-utils.c | 15 +++++++-------- pango/pangoft2-fontmap.c | 1 - pango/pangox-fontmap.c | 1 - 13 files changed, 132 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 64f3677e..06b7748d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2002-02-09 Darin Adler + + * pango/fonts.c: (getword): isspace -> g_ascii_isspace + (pango_font_description_from_string): isspace -> g_ascii_isspace + * pango/modules.c: Remove unneeded 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 include. + * pango/pangox-fontmap.c: Remove unneeded include. + 2002-02-07 Tor Lillqvist * examples/pangoft2topgm.c (main): Accept also outfile name on diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 64f3677e..06b7748d 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,19 @@ +2002-02-09 Darin Adler + + * pango/fonts.c: (getword): isspace -> g_ascii_isspace + (pango_font_description_from_string): isspace -> g_ascii_isspace + * pango/modules.c: Remove unneeded 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 include. + * pango/pangox-fontmap.c: Remove unneeded include. + 2002-02-07 Tor Lillqvist * examples/pangoft2topgm.c (main): Accept also outfile name on diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 64f3677e..06b7748d 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,19 @@ +2002-02-09 Darin Adler + + * pango/fonts.c: (getword): isspace -> g_ascii_isspace + (pango_font_description_from_string): isspace -> g_ascii_isspace + * pango/modules.c: Remove unneeded 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 include. + * pango/pangox-fontmap.c: Remove unneeded include. + 2002-02-07 Tor Lillqvist * examples/pangoft2topgm.c (main): Accept also outfile name on diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 64f3677e..06b7748d 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,19 @@ +2002-02-09 Darin Adler + + * pango/fonts.c: (getword): isspace -> g_ascii_isspace + (pango_font_description_from_string): isspace -> g_ascii_isspace + * pango/modules.c: Remove unneeded 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 include. + * pango/pangox-fontmap.c: Remove unneeded include. + 2002-02-07 Tor Lillqvist * examples/pangoft2topgm.c (main): Accept also outfile name on diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 64f3677e..06b7748d 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,19 @@ +2002-02-09 Darin Adler + + * pango/fonts.c: (getword): isspace -> g_ascii_isspace + (pango_font_description_from_string): isspace -> g_ascii_isspace + * pango/modules.c: Remove unneeded 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 include. + * pango/pangox-fontmap.c: Remove unneeded include. + 2002-02-07 Tor Lillqvist * examples/pangoft2topgm.c (main): Accept also outfile name on diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 64f3677e..06b7748d 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,19 @@ +2002-02-09 Darin Adler + + * pango/fonts.c: (getword): isspace -> g_ascii_isspace + (pango_font_description_from_string): isspace -> g_ascii_isspace + * pango/modules.c: Remove unneeded 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 include. + * pango/pangox-fontmap.c: Remove unneeded include. + 2002-02-07 Tor Lillqvist * examples/pangoft2topgm.c (main): Accept also outfile name on diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 64f3677e..06b7748d 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,19 @@ +2002-02-09 Darin Adler + + * pango/fonts.c: (getword): isspace -> g_ascii_isspace + (pango_font_description_from_string): isspace -> g_ascii_isspace + * pango/modules.c: Remove unneeded 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 include. + * pango/pangox-fontmap.c: Remove unneeded include. + 2002-02-07 Tor Lillqvist * examples/pangoft2topgm.c (main): Accept also outfile name on diff --git a/pango/fonts.c b/pango/fonts.c index 7c1c79b6..5051604c 100644 --- a/pango/fonts.c +++ b/pango/fonts.c @@ -20,7 +20,6 @@ */ #include -#include #include #include @@ -763,11 +762,11 @@ getword (const char *str, const char *last, size_t *wordlen) { const char *result; - while (last > str && isspace (*(last - 1))) + while (last > str && g_ascii_isspace (*(last - 1))) last--; result = last; - while (result > str && !isspace (*(result - 1))) + while (result > str && !g_ascii_isspace (*(result - 1))) result--; *wordlen = last - result; @@ -855,16 +854,16 @@ pango_font_description_from_string (const char *str) /* Remainder (str => p) is family list. Trim off trailing commas and leading and trailing white space */ - while (last > str && isspace (*(last - 1))) + while (last > str && g_ascii_isspace (*(last - 1))) last--; if (last > str && *(last - 1) == ',') last--; - while (last > str && isspace (*(last - 1))) + while (last > str && g_ascii_isspace (*(last - 1))) last--; - while (isspace (*str)) + while (g_ascii_isspace (*str)) str++; if (str != last) diff --git a/pango/modules.c b/pango/modules.c index fe028274..f280920f 100644 --- a/pango/modules.c +++ b/pango/modules.c @@ -21,7 +21,6 @@ #include "config.h" -#include #include #include #include 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 #include #include -#include #include #include @@ -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, "", 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; diff --git a/pango/pango-utils.c b/pango/pango-utils.c index 7ef78746..051ed8ad 100644 --- a/pango/pango-utils.c +++ b/pango/pango-utils.c @@ -19,7 +19,6 @@ * Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -73,11 +72,11 @@ pango_trim_string (const char *str) g_return_val_if_fail (str != NULL, NULL); - while (*str && isspace (*str)) + while (*str && g_ascii_isspace (*str)) str++; len = strlen (str); - while (len > 0 && isspace (str[len-1])) + while (len > 0 && g_ascii_isspace (str[len-1])) len--; return g_strndup (str, len); @@ -264,7 +263,7 @@ pango_skip_space (const char **pos) { const char *p = *pos; - while (isspace (*p)) + while (g_ascii_isspace (*p)) p++; *pos = p; @@ -288,7 +287,7 @@ pango_scan_word (const char **pos, GString *out) { const char *p = *pos; - while (isspace (*p)) + while (g_ascii_isspace (*p)) p++; if (!((*p >= 'A' && *p <= 'Z') || @@ -331,7 +330,7 @@ pango_scan_string (const char **pos, GString *out) { const char *p = *pos; - while (isspace (*p)) + while (g_ascii_isspace (*p)) p++; if (!*p) @@ -390,7 +389,7 @@ pango_scan_string (const char **pos, GString *out) { g_string_truncate (out, 0); - while (*p && !isspace (*p)) + while (*p && !g_ascii_isspace (*p)) { g_string_append_c (out, *p); p++; @@ -420,7 +419,7 @@ pango_scan_int (const char **pos, int *out) char buf[32]; const char *p = *pos; - while (isspace (*p)) + while (g_ascii_isspace (*p)) p++; if (*p < '0' || *p > '9') diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c index 44b383b3..de47afcb 100644 --- a/pango/pangoft2-fontmap.c +++ b/pango/pangoft2-fontmap.c @@ -23,7 +23,6 @@ #include "config.h" #include -#include #include #include #include diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c index 5e28a000..79c332e2 100644 --- a/pango/pangox-fontmap.c +++ b/pango/pangox-fontmap.c @@ -19,7 +19,6 @@ * Boston, MA 02111-1307, USA. */ -#include #include #include #include -- cgit v1.2.1