+Sun Sep 2 13:05:53 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gstrfuncs.c (g_strchomp): Replace some uses
+ of isspace() with g_ascii_isspace().
+
+ * glib/gutf8.c glib/gunicode.h glib/gstrfuncs.[ch]: Add
+ extra indirections to g_utf8_skip and g_ascii_table to
+ avoid great whopping copy relocs.
+
Sun Sep 2 11:10:42 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/gunicomp.h
+Sun Sep 2 13:05:53 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gstrfuncs.c (g_strchomp): Replace some uses
+ of isspace() with g_ascii_isspace().
+
+ * glib/gutf8.c glib/gunicode.h glib/gstrfuncs.[ch]: Add
+ extra indirections to g_utf8_skip and g_ascii_table to
+ avoid great whopping copy relocs.
+
Sun Sep 2 11:10:42 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/gunicomp.h
+Sun Sep 2 13:05:53 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gstrfuncs.c (g_strchomp): Replace some uses
+ of isspace() with g_ascii_isspace().
+
+ * glib/gutf8.c glib/gunicode.h glib/gstrfuncs.[ch]: Add
+ extra indirections to g_utf8_skip and g_ascii_table to
+ avoid great whopping copy relocs.
+
Sun Sep 2 11:10:42 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/gunicomp.h
+Sun Sep 2 13:05:53 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gstrfuncs.c (g_strchomp): Replace some uses
+ of isspace() with g_ascii_isspace().
+
+ * glib/gutf8.c glib/gunicode.h glib/gstrfuncs.[ch]: Add
+ extra indirections to g_utf8_skip and g_ascii_table to
+ avoid great whopping copy relocs.
+
Sun Sep 2 11:10:42 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/gunicomp.h
+Sun Sep 2 13:05:53 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gstrfuncs.c (g_strchomp): Replace some uses
+ of isspace() with g_ascii_isspace().
+
+ * glib/gutf8.c glib/gunicode.h glib/gstrfuncs.[ch]: Add
+ extra indirections to g_utf8_skip and g_ascii_table to
+ avoid great whopping copy relocs.
+
Sun Sep 2 11:10:42 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/gunicomp.h
+Sun Sep 2 13:05:53 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gstrfuncs.c (g_strchomp): Replace some uses
+ of isspace() with g_ascii_isspace().
+
+ * glib/gutf8.c glib/gunicode.h glib/gstrfuncs.[ch]: Add
+ extra indirections to g_utf8_skip and g_ascii_table to
+ avoid great whopping copy relocs.
+
Sun Sep 2 11:10:42 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/gunicomp.h
+Sun Sep 2 13:05:53 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gstrfuncs.c (g_strchomp): Replace some uses
+ of isspace() with g_ascii_isspace().
+
+ * glib/gutf8.c glib/gunicode.h glib/gstrfuncs.[ch]: Add
+ extra indirections to g_utf8_skip and g_ascii_table to
+ avoid great whopping copy relocs.
+
Sun Sep 2 11:10:42 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/gunicomp.h
+Sun Sep 2 13:05:53 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gstrfuncs.c (g_strchomp): Replace some uses
+ of isspace() with g_ascii_isspace().
+
+ * glib/gutf8.c glib/gunicode.h glib/gstrfuncs.[ch]: Add
+ extra indirections to g_utf8_skip and g_ascii_table to
+ avoid great whopping copy relocs.
+
Sun Sep 2 11:10:42 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/gunicomp.h
#if defined(G_PLATFORM_WIN32) && defined(__GNUC__)
__declspec(dllexport)
#endif
-const guint16 g_ascii_table[256] = {
+static const guint16 ascii_table_data[256] = {
0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004,
0x004, 0x104, 0x104, 0x004, 0x104, 0x104, 0x004, 0x004,
0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004,
/* the upper 128 are all zeroes */
};
+const guint16 * const g_ascii_table = ascii_table_data;
+
gchar*
g_strdup (const gchar *str)
{
g_return_val_if_fail (string != NULL, NULL);
- for (start = (guchar*) string; *start && isspace (*start); start++)
+ for (start = (guchar*) string; *start && g_ascii_isspace (*start); start++)
;
g_memmove (string, start, strlen ((gchar *) start) + 1);
if (!*string)
return string;
- for (s = string + strlen (string) - 1; s >= string && isspace ((guchar)*s);
+ for (s = string + strlen (string) - 1; s >= string && g_ascii_isspace ((guchar)*s);
s--)
*s = '\0';
G_ASCII_XDIGIT = 1 << 10
} GAsciiType;
-GLIB_VAR const guint16 g_ascii_table[256];
+GLIB_VAR const guint16 * const g_ascii_table;
#define g_ascii_isalnum(c) \
((g_ascii_table[(guchar) (c)] & G_ASCII_ALNUM) != 0)
gsize *result_len);
/* Array of skip-bytes-per-initial character.
- * We prefix variable declarations so they can
- * properly get exported in Windows DLLs.
*/
-GLIB_VAR char g_utf8_skip[256];
+GLIB_VAR const gchar * const g_utf8_skip;
#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(guchar *)(p)])
(Char) != 0xFFFE && (Char) != 0xFFFF)
-gchar g_utf8_skip[256] = {
+static const gchar utf8_skip_data[256] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0
};
+const gchar * const g_utf8_skip = utf8_skip_data;
+
/**
* g_utf8_find_prev_char:
* @str: pointer to the beginning of a UTF-8 string