diff options
-rw-r--r-- | .cvsignore | 13 | ||||
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-12 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 10 | ||||
-rw-r--r-- | Makefile.am | 133 | ||||
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | docs/reference/glib/.cvsignore | 1 | ||||
-rw-r--r-- | docs/reference/glib/Makefile.am | 6 | ||||
-rw-r--r-- | docs/reference/gobject/.cvsignore | 1 | ||||
-rw-r--r-- | galloca.h | 60 | ||||
-rw-r--r-- | garray.c | 670 | ||||
-rw-r--r-- | garray.h | 156 | ||||
-rw-r--r-- | gasyncqueue.c | 443 | ||||
-rw-r--r-- | gasyncqueue.h | 95 | ||||
-rw-r--r-- | gbacktrace.c | 300 | ||||
-rw-r--r-- | gbacktrace.h | 61 | ||||
-rw-r--r-- | gcache.c | 230 | ||||
-rw-r--r-- | gcache.h | 66 | ||||
-rw-r--r-- | gcompletion.c | 296 | ||||
-rw-r--r-- | gcompletion.h | 71 | ||||
-rw-r--r-- | gconvert.c | 916 | ||||
-rw-r--r-- | gconvert.h | 106 | ||||
-rw-r--r-- | gdataset.c | 631 | ||||
-rw-r--r-- | gdataset.h | 106 | ||||
-rw-r--r-- | gdate.c | 1353 | ||||
-rw-r--r-- | gdate.h | 252 | ||||
-rwxr-xr-x | gen-unicode-tables.pl | 609 | ||||
-rw-r--r-- | gerror.c | 254 | ||||
-rw-r--r-- | gerror.h | 74 | ||||
-rw-r--r-- | gfileutils.c | 698 | ||||
-rw-r--r-- | gfileutils.h | 95 | ||||
-rw-r--r-- | ghash.c | 695 | ||||
-rw-r--r-- | ghash.h | 108 | ||||
-rw-r--r-- | ghook.c | 640 | ||||
-rw-r--r-- | ghook.h | 177 | ||||
-rw-r--r-- | giochannel.c | 148 | ||||
-rw-r--r-- | giochannel.h | 197 | ||||
-rw-r--r-- | giounix.c | 312 | ||||
-rw-r--r-- | giowin32.c | 1179 | ||||
-rw-r--r-- | glib-object.h | 38 | ||||
-rw-r--r-- | glib.h | 75 | ||||
-rw-r--r-- | glib/.cvsignore | 10 | ||||
-rw-r--r-- | glib/Makefile.am | 125 | ||||
-rw-r--r-- | glib/galloca.h | 2 | ||||
-rw-r--r-- | glib/garray.h | 2 | ||||
-rw-r--r-- | glib/gasyncqueue.h | 2 | ||||
-rw-r--r-- | glib/gbacktrace.h | 2 | ||||
-rw-r--r-- | glib/gcache.h | 2 | ||||
-rw-r--r-- | glib/gcompletion.h | 2 | ||||
-rw-r--r-- | glib/gconvert.h | 2 | ||||
-rw-r--r-- | glib/gdataset.h | 2 | ||||
-rw-r--r-- | glib/gdate.h | 2 | ||||
-rw-r--r-- | glib/gerror.h | 2 | ||||
-rw-r--r-- | glib/gfileutils.h | 2 | ||||
-rw-r--r-- | glib/ghash.h | 2 | ||||
-rw-r--r-- | glib/ghook.h | 2 | ||||
-rw-r--r-- | glib/giochannel.h | 4 | ||||
-rw-r--r-- | glib/glib.h | 84 | ||||
-rw-r--r-- | glib/glist.h | 2 | ||||
-rw-r--r-- | glib/gmain.h | 4 | ||||
-rw-r--r-- | glib/gmarkup.h | 2 | ||||
-rw-r--r-- | glib/gmem.h | 2 | ||||
-rw-r--r-- | glib/gmessages.h | 2 | ||||
-rw-r--r-- | glib/gnode.h | 2 | ||||
-rw-r--r-- | glib/gpattern.h | 2 | ||||
-rw-r--r-- | glib/gprimes.h | 2 | ||||
-rw-r--r-- | glib/gqsort.h | 2 | ||||
-rw-r--r-- | glib/gquark.h | 2 | ||||
-rw-r--r-- | glib/gqueue.h | 2 | ||||
-rw-r--r-- | glib/grand.h | 2 | ||||
-rw-r--r-- | glib/grel.h | 2 | ||||
-rw-r--r-- | glib/gscanner.h | 2 | ||||
-rw-r--r-- | glib/gshell.h | 2 | ||||
-rw-r--r-- | glib/gslist.h | 2 | ||||
-rw-r--r-- | glib/gspawn.h | 2 | ||||
-rw-r--r-- | glib/gstrfuncs.h | 2 | ||||
-rw-r--r-- | glib/gstring.h | 2 | ||||
-rw-r--r-- | glib/gthread.h | 4 | ||||
-rw-r--r-- | glib/gthreadpool.h | 2 | ||||
-rw-r--r-- | glib/gtimer.h | 2 | ||||
-rw-r--r-- | glib/gtree.h | 2 | ||||
-rw-r--r-- | glib/gunicode.h | 4 | ||||
-rw-r--r-- | glib/gutils.h | 2 | ||||
-rw-r--r-- | glib/gwin32.h | 2 | ||||
-rw-r--r-- | glibintl.h | 28 | ||||
-rw-r--r-- | glist.c | 826 | ||||
-rw-r--r-- | glist.h | 105 | ||||
-rw-r--r-- | gmacros.h | 193 | ||||
-rw-r--r-- | gmain.c | 2937 | ||||
-rw-r--r-- | gmain.h | 291 | ||||
-rw-r--r-- | gmarkup.c | 1735 | ||||
-rw-r--r-- | gmarkup.h | 123 | ||||
-rw-r--r-- | gmem.c | 1263 | ||||
-rw-r--r-- | gmem.h | 174 | ||||
-rw-r--r-- | gmessages.c | 1256 | ||||
-rw-r--r-- | gmessages.h | 341 | ||||
-rw-r--r-- | gmodule/Makefile.am | 4 | ||||
-rw-r--r-- | gnode.c | 1064 | ||||
-rw-r--r-- | gnode.h | 163 | ||||
-rw-r--r-- | gobject/Makefile.am | 3 | ||||
-rw-r--r-- | gpattern.c | 300 | ||||
-rw-r--r-- | gpattern.h | 58 | ||||
-rw-r--r-- | gprimes.c | 83 | ||||
-rw-r--r-- | gprimes.h | 47 | ||||
-rw-r--r-- | gqsort.c | 282 | ||||
-rw-r--r-- | gqsort.h | 44 | ||||
-rw-r--r-- | gquark.h | 46 | ||||
-rw-r--r-- | gqueue.c | 263 | ||||
-rw-r--r-- | gqueue.h | 65 | ||||
-rw-r--r-- | grand.c | 403 | ||||
-rw-r--r-- | grand.h | 82 | ||||
-rw-r--r-- | grel.c | 459 | ||||
-rw-r--r-- | grel.h | 94 | ||||
-rw-r--r-- | gscanner.c | 1728 | ||||
-rw-r--r-- | gscanner.h | 271 | ||||
-rw-r--r-- | gshell.c | 651 | ||||
-rw-r--r-- | gshell.h | 53 | ||||
-rw-r--r-- | gslist.c | 728 | ||||
-rw-r--r-- | gslist.h | 102 | ||||
-rw-r--r-- | gspawn-win32-helper.c | 218 | ||||
-rw-r--r-- | gspawn-win32.c | 987 | ||||
-rw-r--r-- | gspawn.c | 1404 | ||||
-rw-r--r-- | gspawn.h | 128 | ||||
-rw-r--r-- | gstrfuncs.c | 1660 | ||||
-rw-r--r-- | gstrfuncs.h | 136 | ||||
-rw-r--r-- | gstring.c | 616 | ||||
-rw-r--r-- | gstring.h | 110 | ||||
-rw-r--r-- | gthread.c | 823 | ||||
-rw-r--r-- | gthread.h | 334 | ||||
-rw-r--r-- | gthread/Makefile.am | 4 | ||||
-rw-r--r-- | gthreadpool.c | 678 | ||||
-rw-r--r-- | gthreadpool.h | 102 | ||||
-rw-r--r-- | gtimer.c | 276 | ||||
-rw-r--r-- | gtimer.h | 57 | ||||
-rw-r--r-- | gtree.c | 1117 | ||||
-rw-r--r-- | gtree.h | 84 | ||||
-rw-r--r-- | gtypes.h | 350 | ||||
-rw-r--r-- | gunibreak.c | 55 | ||||
-rw-r--r-- | gunibreak.h | 7254 | ||||
-rw-r--r-- | gunichartables.h | 5957 | ||||
-rw-r--r-- | gunicode.h | 252 | ||||
-rw-r--r-- | gunidecomp.c | 133 | ||||
-rw-r--r-- | gunidecomp.h | 1857 | ||||
-rw-r--r-- | guniprop.c | 471 | ||||
-rw-r--r-- | gutf8.c | 1482 | ||||
-rw-r--r-- | gutils.c | 1107 | ||||
-rw-r--r-- | gutils.h | 332 | ||||
-rw-r--r-- | gwin32.c | 1032 | ||||
-rw-r--r-- | gwin32.h | 130 | ||||
-rw-r--r-- | testgdate.c | 489 | ||||
-rw-r--r-- | testgdateparser.c | 112 | ||||
-rw-r--r-- | testglib.c | 1252 | ||||
-rw-r--r-- | tests/.cvsignore | 5 | ||||
-rw-r--r-- | tests/Makefile.am | 15 | ||||
-rw-r--r-- | timeloop-basic.c | 232 | ||||
-rw-r--r-- | timeloop.c | 213 |
162 files changed, 221 insertions, 59167 deletions
diff --git a/.cvsignore b/.cvsignore index d8cb34b3e..fd945085b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,10 +1,3 @@ -*.lo -*.obj -*.lib -*.dll -*.exe -.deps -.libs Makefile Makefile.in _libs @@ -20,7 +13,6 @@ glib.spec glibconfig-sysdefs.h glibconfig.h glibconfig.h.win32 -libglib-1.3.la libtool makefile.cygwin makefile.mingw @@ -29,11 +21,6 @@ so_locations stamp-gc-h stamp-h stamp-h.in -testgdate -testgdateparser -testglib -timeloop -timeloop-basic annotations logs glib.rc @@ -1,3 +1,13 @@ +Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am: + Move glib library into a subdirectory, make all GLib include + files include as <glib/glist.h> + + * tests/testglib.c tests/testgdate.c tests/testgdateparser.c + tests/timeloop.c tests/timeloop-basic.c: Move all tests into + the tests/ subdirectory. + Sat Jun 23 17:34:38 2001 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5). diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5ca24a1cf..f243e770d 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am: + Move glib library into a subdirectory, make all GLib include + files include as <glib/glist.h> + + * tests/testglib.c tests/testgdate.c tests/testgdateparser.c + tests/timeloop.c tests/timeloop-basic.c: Move all tests into + the tests/ subdirectory. + Sat Jun 23 17:34:38 2001 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5). diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5ca24a1cf..f243e770d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am: + Move glib library into a subdirectory, make all GLib include + files include as <glib/glist.h> + + * tests/testglib.c tests/testgdate.c tests/testgdateparser.c + tests/timeloop.c tests/timeloop-basic.c: Move all tests into + the tests/ subdirectory. + Sat Jun 23 17:34:38 2001 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5). diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 5ca24a1cf..f243e770d 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,13 @@ +Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am: + Move glib library into a subdirectory, make all GLib include + files include as <glib/glist.h> + + * tests/testglib.c tests/testgdate.c tests/testgdateparser.c + tests/timeloop.c tests/timeloop-basic.c: Move all tests into + the tests/ subdirectory. + Sat Jun 23 17:34:38 2001 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5). diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5ca24a1cf..f243e770d 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am: + Move glib library into a subdirectory, make all GLib include + files include as <glib/glist.h> + + * tests/testglib.c tests/testgdate.c tests/testgdateparser.c + tests/timeloop.c tests/timeloop-basic.c: Move all tests into + the tests/ subdirectory. + Sat Jun 23 17:34:38 2001 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5). diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5ca24a1cf..f243e770d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am: + Move glib library into a subdirectory, make all GLib include + files include as <glib/glist.h> + + * tests/testglib.c tests/testgdate.c tests/testgdateparser.c + tests/timeloop.c tests/timeloop-basic.c: Move all tests into + the tests/ subdirectory. + Sat Jun 23 17:34:38 2001 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5). diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5ca24a1cf..f243e770d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am: + Move glib library into a subdirectory, make all GLib include + files include as <glib/glist.h> + + * tests/testglib.c tests/testgdate.c tests/testgdateparser.c + tests/timeloop.c tests/timeloop-basic.c: Move all tests into + the tests/ subdirectory. + Sat Jun 23 17:34:38 2001 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5). diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5ca24a1cf..f243e770d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com> + + * configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am: + Move glib library into a subdirectory, make all GLib include + files include as <glib/glist.h> + + * tests/testglib.c tests/testgdate.c tests/testgdateparser.c + tests/timeloop.c tests/timeloop-basic.c: Move all tests into + the tests/ subdirectory. + Sat Jun 23 17:34:38 2001 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5). diff --git a/Makefile.am b/Makefile.am index 11b4e82d0..932b479de 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = 1.4 -SUBDIRS = . m4macros gobject gmodule gthread docs tests build +SUBDIRS = . m4macros glib gobject gmodule gthread docs tests build INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \ -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION @@ -41,107 +41,6 @@ BUILT_EXTRA_DIST = \ glib.rc \ glib.spec -lib_LTLIBRARIES = libglib-1.3.la - -libglib_1_3_la_SOURCES = \ - garray.c \ - gasyncqueue.c \ - gbacktrace.c \ - gcache.c \ - gcompletion.c \ - gconvert.c \ - gdataset.c \ - gdate.c \ - gerror.c \ - gfileutils.c \ - ghash.c \ - ghook.c \ - giochannel.c \ - glibintl.h \ - glist.c \ - gmain.c \ - gmarkup.c \ - gmem.c \ - gmessages.c \ - gnode.c \ - gpattern.c \ - gprimes.c \ - gqsort.c \ - gqueue.c \ - grel.c \ - grand.c \ - gscanner.c \ - gshell.c \ - gslist.c \ - gstrfuncs.c \ - gstring.c \ - gthread.c \ - gthreadpool.c \ - gtimer.c \ - gtree.c \ - guniprop.c \ - gutf8.c \ - gunibreak.h \ - gunibreak.c \ - gunichartables.h \ - gunidecomp.h \ - gunidecomp.c \ - gutils.c - -EXTRA_libglib_1_3_la_SOURCES = \ - giounix.c \ - giowin32.c \ - gspawn.c \ - gspawn-win32.c \ - gwin32.c - -glibincludedir=$(includedir)/glib-2.0 -glibinclude_HEADERS = \ - galloca.h \ - garray.h \ - gasyncqueue.h \ - gbacktrace.h \ - gcache.h \ - gcompletion.h \ - gconvert.h \ - gdataset.h \ - gdate.h \ - gerror.h \ - gfileutils.h \ - ghash.h \ - ghook.h \ - giochannel.h \ - glib.h \ - glib-object.h \ - glist.h \ - gmacros.h \ - gmain.h \ - gmarkup.h \ - gmem.h \ - gmessages.h \ - gnode.h \ - gpattern.h \ - gprimes.h \ - gqsort.h \ - gquark.h \ - gqueue.h \ - grand.h \ - grel.h \ - gscanner.h \ - gshell.h \ - gslist.h \ - gspawn.h \ - gstrfuncs.h \ - gstring.h \ - gthread.h \ - gthreadpool.h \ - gtimer.h \ - gtree.h \ - gtypes.h \ - gunicode.h \ - gutils.h \ - gwin32.h - configexecincludedir = $(libdir)/glib-2.0/include #configexecinclude_DATA = glibconfig.h @@ -161,36 +60,6 @@ stamp-gc-h: config.status CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status echo timestamp > stamp-gc-h -libglib_1_3_la_LIBADD = @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ -libglib_1_3_la_DEPENDENCIES = @GIO@ @GSPAWN@ @PLATFORMDEP@ - - -if PLATFORM_WIN32 -no_undefined = -no-undefined -endif -if OS_WIN32 -# This requires a very new libtool -export_symbols = -export-symbols glib.def -endif - -libglib_1_3_la_LDFLAGS = \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -export-dynamic $(no_undefined) $(export_symbols) - -if OS_WIN32 -bin_PROGRAMS = gspawn-win32-helper -gspawn_win32_helper_LDADD = libglib-1.3.la -endif -if ENABLE_TIMELOOP -timeloop = timeloop -endif -noinst_PROGRAMS = testglib testgdate testgdateparser $(timeloop) -testglib_LDADD = libglib-1.3.la -testgdate_LDADD = libglib-1.3.la -testgdateparser_LDADD = libglib-1.3.la -if ENABLE_TIMELOOP -timeloop_LDADD = libglib-1.3.la -endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc diff --git a/autogen.sh b/autogen.sh index cfa06d972..24012686f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -8,7 +8,7 @@ ORIGDIR=`pwd` cd $srcdir PROJECT=GLib TEST_TYPE=-f -FILE=glib.h +FILE=glib/glib.h DIE=0 diff --git a/configure.in b/configure.in index 6e39dbbd9..fc315711c 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ builtin(include, acglib.m4)dnl AC_PREREQ(2.13) # Process this file with autoconf to produce a configure script. -AC_INIT(glist.c) +AC_INIT(glib/glib.h) # Save this value here, since automake will set cflags later cflags_set=${CFLAGS+set} @@ -1535,7 +1535,7 @@ case "$CONFIG_OTHER" in #ifndef __G_LIBCONFIG_H__ #define __G_LIBCONFIG_H__ -#include <gmacros.h> +#include <glib/gmacros.h> _______EOF @@ -2039,6 +2039,7 @@ glib.spec Makefile build/Makefile build/win32/Makefile +glib/Makefile gmodule/gmoduleconf.h gmodule/Makefile gobject/Makefile diff --git a/docs/reference/glib/.cvsignore b/docs/reference/glib/.cvsignore index 41882db18..cf19db771 100644 --- a/docs/reference/glib/.cvsignore +++ b/docs/reference/glib/.cvsignore @@ -3,6 +3,7 @@ Makefile.in glib-decl-list.txt glib-decl.txt glib-unused.txt +glib-undocumented.txt html sgml *.stamp diff --git a/docs/reference/glib/Makefile.am b/docs/reference/glib/Makefile.am index 82cb40422..7fca34b88 100644 --- a/docs/reference/glib/Makefile.am +++ b/docs/reference/glib/Makefile.am @@ -7,7 +7,7 @@ DOC_MODULE=glib DOC_MAIN_SGML_FILE=glib-docs.sgml # The directory containing the source code. Relative to $(srcdir) -DOC_SOURCE_DIR=../../.. +DOC_SOURCE_DIR=../../../glib # Extra options to supply to gtkdoc-scan SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" @@ -19,8 +19,8 @@ MKDB_OPTIONS= FIXXREF_OPTIONS= # Used for dependencies -HFILE_GLOB=$(top_srcdir)/*.h $(top_srcdir)/gmodule/*.h -CFILE_GLOB=$(top_srcdir)/*.c $(top_srcdir)/gmodule/*.c +HFILE_GLOB=$(top_srcdir)/glib/*.h $(top_srcdir)/gmodule/*.h +CFILE_GLOB=$(top_srcdir)/glib/*.c $(top_srcdir)/gmodule/*.c # Headers to ignore IGNORE_HFILES= \ diff --git a/docs/reference/gobject/.cvsignore b/docs/reference/gobject/.cvsignore index dede52a5d..a18aa110d 100644 --- a/docs/reference/gobject/.cvsignore +++ b/docs/reference/gobject/.cvsignore @@ -3,6 +3,7 @@ Makefile.in gobject-decl.txt gobject-unused.txt gobject-decl-list.txt +gobject-undocumented.txt html sgml *.stamp diff --git a/galloca.h b/galloca.h deleted file mode 100644 index b4194d4ac..000000000 --- a/galloca.h +++ /dev/null @@ -1,60 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_ALLOCA_H__ -#define __G_ALLOCA_H__ - -#include <gtypes.h> - -#ifdef __GNUC__ -/* GCC does the right thing */ -# undef alloca -# define alloca(size) __builtin_alloca (size) -#elif defined (GLIB_HAVE_ALLOCA_H) -/* a native and working alloca.h is there */ -# include <alloca.h> -#else /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ -# ifdef _MSC_VER -# include <malloc.h> -# define alloca _alloca -# else /* !_MSC_VER */ -# ifdef _AIX - #pragma alloca -# else /* !_AIX */ -# ifndef alloca /* predefined by HP cc +Olibcalls */ -G_BEGIN_DECLS -char *alloca (); -G_END_DECLS -# endif /* !alloca */ -# endif /* !_AIX */ -# endif /* !_MSC_VER */ -#endif /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ - -#define g_alloca(size) alloca (size) - - -#endif /* __G_ALLOCA_H__ */ - diff --git a/garray.c b/garray.c deleted file mode 100644 index 9a5758f88..000000000 --- a/garray.c +++ /dev/null @@ -1,670 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <string.h> -#include <stdlib.h> -#include "glib.h" - - -#define MIN_ARRAY_SIZE 16 - -typedef struct _GRealArray GRealArray; - -struct _GRealArray -{ - guint8 *data; - guint len; - guint alloc; - guint elt_size; - guint zero_terminated : 1; - guint clear : 1; -}; - -#define g_array_elt_len(array,i) ((array)->elt_size * (i)) -#define g_array_elt_pos(array,i) ((array)->data + g_array_elt_len((array),(i))) -#define g_array_elt_zero(array, pos, len) \ - (memset (g_array_elt_pos ((array), pos), 0, g_array_elt_len ((array), len))) -#define g_array_zero_terminate(array) G_STMT_START{ \ - if ((array)->zero_terminated) \ - g_array_elt_zero ((array), (array)->len, 1); \ -}G_STMT_END - -static gint g_nearest_pow (gint num) G_GNUC_CONST; -static void g_array_maybe_expand (GRealArray *array, - gint len); - -static GMemChunk *array_mem_chunk = NULL; -G_LOCK_DEFINE_STATIC (array_mem_chunk); - -GArray* -g_array_new (gboolean zero_terminated, - gboolean clear, - guint elt_size) -{ - return (GArray*) g_array_sized_new (zero_terminated, clear, elt_size, 0); -} - -GArray* g_array_sized_new (gboolean zero_terminated, - gboolean clear, - guint elt_size, - guint reserved_size) -{ - GRealArray *array; - - G_LOCK (array_mem_chunk); - if (!array_mem_chunk) - array_mem_chunk = g_mem_chunk_new ("array mem chunk", - sizeof (GRealArray), - 1024, G_ALLOC_AND_FREE); - - array = g_chunk_new (GRealArray, array_mem_chunk); - G_UNLOCK (array_mem_chunk); - - array->data = NULL; - array->len = 0; - array->alloc = 0; - array->zero_terminated = (zero_terminated ? 1 : 0); - array->clear = (clear ? 1 : 0); - array->elt_size = elt_size; - - if (array->zero_terminated || reserved_size != 0) - { - g_array_maybe_expand (array, reserved_size); - g_array_zero_terminate(array); - } - - return (GArray*) array; -} - -gchar* -g_array_free (GArray *array, - gboolean free_segment) -{ - gchar* segment; - - g_return_val_if_fail (array, NULL); - - if (free_segment) - { - g_free (array->data); - segment = NULL; - } - else - segment = array->data; - - G_LOCK (array_mem_chunk); - g_mem_chunk_free (array_mem_chunk, array); - G_UNLOCK (array_mem_chunk); - - return segment; -} - -GArray* -g_array_append_vals (GArray *farray, - gconstpointer data, - guint len) -{ - GRealArray *array = (GRealArray*) farray; - - g_array_maybe_expand (array, len); - - memcpy (g_array_elt_pos (array, array->len), data, - g_array_elt_len (array, len)); - - array->len += len; - - g_array_zero_terminate (array); - - return farray; -} - -GArray* -g_array_prepend_vals (GArray *farray, - gconstpointer data, - guint len) -{ - GRealArray *array = (GRealArray*) farray; - - g_array_maybe_expand (array, len); - - g_memmove (g_array_elt_pos (array, len), g_array_elt_pos (array, 0), - g_array_elt_len (array, array->len)); - - memcpy (g_array_elt_pos (array, 0), data, g_array_elt_len (array, len)); - - array->len += len; - - g_array_zero_terminate (array); - - return farray; -} - -GArray* -g_array_insert_vals (GArray *farray, - guint index, - gconstpointer data, - guint len) -{ - GRealArray *array = (GRealArray*) farray; - - g_array_maybe_expand (array, len); - - g_memmove (g_array_elt_pos (array, len + index), - g_array_elt_pos (array, index), - g_array_elt_len (array, array->len - index)); - - memcpy (g_array_elt_pos (array, index), data, g_array_elt_len (array, len)); - - array->len += len; - - g_array_zero_terminate (array); - - return farray; -} - -GArray* -g_array_set_size (GArray *farray, - guint length) -{ - GRealArray *array = (GRealArray*) farray; - if (length > array->len) - { - g_array_maybe_expand (array, length - array->len); - - if (array->clear) - g_array_elt_zero (array, array->len, length - array->len); - } -#ifdef ENABLE_GC_FRIENDLY - else if (length < array->len) - g_array_elt_zero (array, length, array->len - length); -#endif /* ENABLE_GC_FRIENDLY */ - - array->len = length; - - g_array_zero_terminate (array); - - return farray; -} - -GArray* -g_array_remove_index (GArray* farray, - guint index) -{ - GRealArray* array = (GRealArray*) farray; - - g_return_val_if_fail (array, NULL); - - g_return_val_if_fail (index < array->len, NULL); - - if (index != array->len - 1) - g_memmove (g_array_elt_pos (array, index), - g_array_elt_pos (array, index + 1), - g_array_elt_len (array, array->len - index - 1)); - - array->len -= 1; - -#ifdef ENABLE_GC_FRIENDLY - g_array_elt_zero (array, array->len, 1); -#else /* !ENABLE_GC_FRIENDLY */ - g_array_zero_terminate (array); -#endif /* ENABLE_GC_FRIENDLY */ - - return farray; -} - -GArray* -g_array_remove_index_fast (GArray* farray, - guint index) -{ - GRealArray* array = (GRealArray*) farray; - - g_return_val_if_fail (array, NULL); - - g_return_val_if_fail (index < array->len, NULL); - - if (index != array->len - 1) - memcpy (g_array_elt_pos (array, index), - g_array_elt_pos (array, array->len - 1), - g_array_elt_len (array, 1)); - - array->len -= 1; - -#ifdef ENABLE_GC_FRIENDLY - g_array_elt_zero (array, array->len, 1); -#else /* !ENABLE_GC_FRIENDLY */ - g_array_zero_terminate (array); -#endif /* ENABLE_GC_FRIENDLY */ - - return farray; -} - -void -g_array_sort (GArray *farray, - GCompareFunc compare_func) -{ - GRealArray *array = (GRealArray*) farray; - - g_return_if_fail (array != NULL); - g_return_if_fail (array->data != NULL); - - qsort (array->data, - array->len, - array->elt_size, - compare_func); -} - -void -g_array_sort_with_data (GArray *farray, - GCompareDataFunc compare_func, - gpointer user_data) -{ - GRealArray *array = (GRealArray*) farray; - - g_return_if_fail (array != NULL); - g_return_if_fail (array->data != NULL); - - g_qsort_with_data (array->data, - array->len, - array->elt_size, - compare_func, - user_data); -} - - -static gint -g_nearest_pow (gint num) -{ - gint n = 1; - - while (n < num) - n <<= 1; - - return n; -} - -static void -g_array_maybe_expand (GRealArray *array, - gint len) -{ - guint want_alloc = g_array_elt_len (array, array->len + len + - array->zero_terminated); - - if (want_alloc > array->alloc) - { - want_alloc = g_nearest_pow (want_alloc); - want_alloc = MAX (want_alloc, MIN_ARRAY_SIZE); - - array->data = g_realloc (array->data, want_alloc); - -#ifdef ENABLE_GC_FRIENDLY - memset (array->data + array->alloc, 0, want_alloc - array->alloc); -#endif /* ENABLE_GC_FRIENDLY */ - - array->alloc = want_alloc; - } -} - -/* Pointer Array - */ - -typedef struct _GRealPtrArray GRealPtrArray; - -struct _GRealPtrArray -{ - gpointer *pdata; - guint len; - guint alloc; -}; - -static void g_ptr_array_maybe_expand (GRealPtrArray *array, - gint len); - -static GMemChunk *ptr_array_mem_chunk = NULL; -G_LOCK_DEFINE_STATIC (ptr_array_mem_chunk); - - -GPtrArray* -g_ptr_array_new (void) -{ - return g_ptr_array_sized_new (0); -} - -GPtrArray* -g_ptr_array_sized_new (guint reserved_size) -{ - GRealPtrArray *array; - - G_LOCK (ptr_array_mem_chunk); - if (!ptr_array_mem_chunk) - ptr_array_mem_chunk = g_mem_chunk_new ("array mem chunk", - sizeof (GRealPtrArray), - 1024, G_ALLOC_AND_FREE); - - array = g_chunk_new (GRealPtrArray, ptr_array_mem_chunk); - G_UNLOCK (ptr_array_mem_chunk); - - array->pdata = NULL; - array->len = 0; - array->alloc = 0; - - if (reserved_size != 0) - g_ptr_array_maybe_expand (array, reserved_size); - - return (GPtrArray*) array; -} - -gpointer* -g_ptr_array_free (GPtrArray *array, - gboolean free_segment) -{ - gpointer* segment; - - g_return_val_if_fail (array, NULL); - - if (free_segment) - { - g_free (array->pdata); - segment = NULL; - } - else - segment = array->pdata; - - G_LOCK (ptr_array_mem_chunk); - g_mem_chunk_free (ptr_array_mem_chunk, array); - G_UNLOCK (ptr_array_mem_chunk); - - return segment; -} - -static void -g_ptr_array_maybe_expand (GRealPtrArray *array, - gint len) -{ - if ((array->len + len) > array->alloc) - { -#ifdef ENABLE_GC_FRIENDLY - guint old_alloc = array->alloc; -#endif /* ENABLE_GC_FRIENDLY */ - array->alloc = g_nearest_pow (array->len + len); - array->alloc = MAX (array->alloc, MIN_ARRAY_SIZE); - array->pdata = g_realloc (array->pdata, sizeof(gpointer) * array->alloc); -#ifdef ENABLE_GC_FRIENDLY - for ( ; old_alloc < array->alloc; old_alloc++) - array->pdata [old_alloc] = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - } -} - -void -g_ptr_array_set_size (GPtrArray *farray, - gint length) -{ - GRealPtrArray* array = (GRealPtrArray*) farray; - - g_return_if_fail (array); - - if (length > array->len) - { - int i; - g_ptr_array_maybe_expand (array, (length - array->len)); - /* This is not - * memset (array->pdata + array->len, 0, - * sizeof (gpointer) * (length - array->len)); - * to make it really portable. Remember (void*)NULL needn't be - * bitwise zero. It of course is silly not to use memset (..,0,..). - */ - for (i = array->len; i < length; i++) - array->pdata[i] = NULL; - } -#ifdef ENABLE_GC_FRIENDLY - else if (length < array->len) - { - int i; - for (i = length; i < array->len; i++) - array->pdata[i] = NULL; - } -#endif /* ENABLE_GC_FRIENDLY */ - - array->len = length; -} - -gpointer -g_ptr_array_remove_index (GPtrArray* farray, - guint index) -{ - GRealPtrArray* array = (GRealPtrArray*) farray; - gpointer result; - - g_return_val_if_fail (array, NULL); - - g_return_val_if_fail (index < array->len, NULL); - - result = array->pdata[index]; - - if (index != array->len - 1) - g_memmove (array->pdata + index, array->pdata + index + 1, - sizeof (gpointer) * (array->len - index - 1)); - - array->len -= 1; - -#ifdef ENABLE_GC_FRIENDLY - array->pdata[array->len] = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - return result; -} - -gpointer -g_ptr_array_remove_index_fast (GPtrArray* farray, - guint index) -{ - GRealPtrArray* array = (GRealPtrArray*) farray; - gpointer result; - - g_return_val_if_fail (array, NULL); - - g_return_val_if_fail (index < array->len, NULL); - - result = array->pdata[index]; - - if (index != array->len - 1) - array->pdata[index] = array->pdata[array->len - 1]; - - array->len -= 1; - -#ifdef ENABLE_GC_FRIENDLY - array->pdata[array->len] = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - return result; -} - -gboolean -g_ptr_array_remove (GPtrArray* farray, - gpointer data) -{ - GRealPtrArray* array = (GRealPtrArray*) farray; - guint i; - - g_return_val_if_fail (array, FALSE); - - for (i = 0; i < array->len; i += 1) - { - if (array->pdata[i] == data) - { - g_ptr_array_remove_index (farray, i); - return TRUE; - } - } - - return FALSE; -} - -gboolean -g_ptr_array_remove_fast (GPtrArray* farray, - gpointer data) -{ - GRealPtrArray* array = (GRealPtrArray*) farray; - guint i; - - g_return_val_if_fail (array, FALSE); - - for (i = 0; i < array->len; i += 1) - { - if (array->pdata[i] == data) - { - g_ptr_array_remove_index_fast (farray, i); - return TRUE; - } - } - - return FALSE; -} - -void -g_ptr_array_add (GPtrArray* farray, - gpointer data) -{ - GRealPtrArray* array = (GRealPtrArray*) farray; - - g_return_if_fail (array); - - g_ptr_array_maybe_expand (array, 1); - - array->pdata[array->len++] = data; -} - -void -g_ptr_array_sort (GPtrArray *array, - GCompareFunc compare_func) -{ - g_return_if_fail (array != NULL); - g_return_if_fail (array->pdata != NULL); - - qsort (array->pdata, - array->len, - sizeof (gpointer), - compare_func); -} - -void -g_ptr_array_sort_with_data (GPtrArray *array, - GCompareDataFunc compare_func, - gpointer user_data) -{ - g_return_if_fail (array != NULL); - g_return_if_fail (array->pdata != NULL); - - g_qsort_with_data (array->pdata, - array->len, - sizeof (gpointer), - compare_func, - user_data); -} - -/* Byte arrays - */ - -GByteArray* g_byte_array_new (void) -{ - return (GByteArray*) g_array_sized_new (FALSE, FALSE, 1, 0); -} - -GByteArray* g_byte_array_sized_new (guint reserved_size) -{ - return (GByteArray*) g_array_sized_new (FALSE, FALSE, 1, reserved_size); -} - -guint8* g_byte_array_free (GByteArray *array, - gboolean free_segment) -{ - return (guint8*) g_array_free ((GArray*) array, free_segment); -} - -GByteArray* g_byte_array_append (GByteArray *array, - const guint8 *data, - guint len) -{ - g_array_append_vals ((GArray*) array, (guint8*)data, len); - - return array; -} - -GByteArray* g_byte_array_prepend (GByteArray *array, - const guint8 *data, - guint len) -{ - g_array_prepend_vals ((GArray*) array, (guint8*)data, len); - - return array; -} - -GByteArray* g_byte_array_set_size (GByteArray *array, - guint length) -{ - g_array_set_size ((GArray*) array, length); - - return array; -} - -GByteArray* g_byte_array_remove_index (GByteArray *array, - guint index) -{ - g_array_remove_index((GArray*) array, index); - - return array; -} - -GByteArray* g_byte_array_remove_index_fast (GByteArray *array, - guint index) -{ - g_array_remove_index_fast((GArray*) array, index); - - return array; -} - -void -g_byte_array_sort (GByteArray *array, - GCompareFunc compare_func) -{ - g_array_sort ((GArray *) array, compare_func); -} - -void -g_byte_array_sort_with_data (GByteArray *array, - GCompareDataFunc compare_func, - gpointer user_data) -{ - g_array_sort_with_data ((GArray *) array, compare_func, user_data); -} diff --git a/garray.h b/garray.h deleted file mode 100644 index 766da77d6..000000000 --- a/garray.h +++ /dev/null @@ -1,156 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_ARRAY_H__ -#define __G_ARRAY_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef struct _GArray GArray; -typedef struct _GByteArray GByteArray; -typedef struct _GPtrArray GPtrArray; - -struct _GArray -{ - gchar *data; - guint len; -}; - -struct _GByteArray -{ - guint8 *data; - guint len; -}; - -struct _GPtrArray -{ - gpointer *pdata; - guint len; -}; - -/* Resizable arrays, remove fills any cleared spot and shortens the - * array, while preserving the order. remove_fast will distort the - * order by moving the last element to the position of the removed - */ - -#define g_array_append_val(a,v) g_array_append_vals (a, &(v), 1) -#define g_array_prepend_val(a,v) g_array_prepend_vals (a, &(v), 1) -#define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &(v), 1) -#define g_array_index(a,t,i) (((t*) (a)->data) [(i)]) - -GArray* g_array_new (gboolean zero_terminated, - gboolean clear, - guint element_size); -GArray* g_array_sized_new (gboolean zero_terminated, - gboolean clear, - guint element_size, - guint reserved_size); -gchar* g_array_free (GArray *array, - gboolean free_segment); -GArray* g_array_append_vals (GArray *array, - gconstpointer data, - guint len); -GArray* g_array_prepend_vals (GArray *array, - gconstpointer data, - guint len); -GArray* g_array_insert_vals (GArray *array, - guint index, - gconstpointer data, - guint len); -GArray* g_array_set_size (GArray *array, - guint length); -GArray* g_array_remove_index (GArray *array, - guint index); -GArray* g_array_remove_index_fast (GArray *array, - guint index); -void g_array_sort (GArray *array, - GCompareFunc compare_func); -void g_array_sort_with_data (GArray *array, - GCompareDataFunc compare_func, - gpointer user_data); - -/* Resizable pointer array. This interface is much less complicated - * than the above. Add appends appends a pointer. Remove fills any - * cleared spot and shortens the array. remove_fast will again distort - * order. - */ -#define g_ptr_array_index(array,index) (array->pdata)[index] -GPtrArray* g_ptr_array_new (void); -GPtrArray* g_ptr_array_sized_new (guint reserved_size); -gpointer* g_ptr_array_free (GPtrArray *array, - gboolean free_seg); -void g_ptr_array_set_size (GPtrArray *array, - gint length); -gpointer g_ptr_array_remove_index (GPtrArray *array, - guint index); -gpointer g_ptr_array_remove_index_fast (GPtrArray *array, - guint index); -gboolean g_ptr_array_remove (GPtrArray *array, - gpointer data); -gboolean g_ptr_array_remove_fast (GPtrArray *array, - gpointer data); -void g_ptr_array_add (GPtrArray *array, - gpointer data); -void g_ptr_array_sort (GPtrArray *array, - GCompareFunc compare_func); -void g_ptr_array_sort_with_data (GPtrArray *array, - GCompareDataFunc compare_func, - gpointer user_data); - - -/* Byte arrays, an array of guint8. Implemented as a GArray, - * but type-safe. - */ - -GByteArray* g_byte_array_new (void); -GByteArray* g_byte_array_sized_new (guint reserved_size); -guint8* g_byte_array_free (GByteArray *array, - gboolean free_segment); -GByteArray* g_byte_array_append (GByteArray *array, - const guint8 *data, - guint len); -GByteArray* g_byte_array_prepend (GByteArray *array, - const guint8 *data, - guint len); -GByteArray* g_byte_array_set_size (GByteArray *array, - guint length); -GByteArray* g_byte_array_remove_index (GByteArray *array, - guint index); -GByteArray* g_byte_array_remove_index_fast (GByteArray *array, - guint index); -void g_byte_array_sort (GByteArray *array, - GCompareFunc compare_func); -void g_byte_array_sort_with_data (GByteArray *array, - GCompareDataFunc compare_func, - gpointer user_data); - - -G_END_DECLS - -#endif /* __G_ARRAY_H__ */ - diff --git a/gasyncqueue.c b/gasyncqueue.c deleted file mode 100644 index c6624799a..000000000 --- a/gasyncqueue.c +++ /dev/null @@ -1,443 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * GAsyncQueue: asynchronous queue implementation, based on Gqueue. - * Copyright (C) 2000 Sebastian Wilhelmi; University of Karlsruhe - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * MT safe - */ - -#include "glib.h" - -struct _GAsyncQueue -{ - GMutex *mutex; - GCond *cond; - GQueue *queue; - guint waiting_threads; - guint ref_count; -}; - -/** - * g_async_queue_new: - * - * Creates a new asynchronous queue with the initial reference count of 1. - * - * Return value: the new #GAsyncQueue. - **/ -GAsyncQueue* -g_async_queue_new () -{ - GAsyncQueue* retval = g_new (GAsyncQueue, 1); - retval->mutex = g_mutex_new (); - retval->cond = g_cond_new (); - retval->queue = g_queue_new (); - retval->waiting_threads = 0; - retval->ref_count = 1; - return retval; -} - -/** - * g_async_queue_ref: - * @queue: a #GAsyncQueue. - * - * Increases the reference count of the asynchronous @queue by 1. - **/ -void -g_async_queue_ref (GAsyncQueue *queue) -{ - g_return_if_fail (queue); - g_return_if_fail (queue->ref_count > 0); - - g_mutex_lock (queue->mutex); - queue->ref_count++; - g_mutex_unlock (queue->mutex); -} - -/** - * g_async_queue_ref_unlocked: - * @queue: a #GAsyncQueue. - * - * Increases the reference count of the asynchronous @queue by 1. This - * function must be called while holding the @queue's lock. - **/ -void -g_async_queue_ref_unlocked (GAsyncQueue *queue) -{ - g_return_if_fail (queue); - g_return_if_fail (queue->ref_count > 0); - - queue->ref_count++; -} - -/** - * g_async_queue_unref_and_unlock: - * @queue: a #GAsyncQueue. - * - * Decreases the reference count of the asynchronous @queue by 1 and - * releases the lock. This function must be called while holding the - * @queue's lock. If the reference count went to 0, the @queue will be - * destroyed and the memory allocated will be freed. So you are not - * allowed to use the @queue afterwards, as it might have disappeared. - * The obvious asymmetry (it is not named - * g_async_queue_unref_unlocked) is because the queue can't be - * unlocked after dereffing it, as it might already have disappeared. - **/ -void -g_async_queue_unref_and_unlock (GAsyncQueue *queue) -{ - gboolean stop; - - g_return_if_fail (queue); - g_return_if_fail (queue->ref_count > 0); - - queue->ref_count--; - stop = (queue->ref_count == 0); - g_mutex_unlock (queue->mutex); - - if (stop) - { - g_return_if_fail (queue->waiting_threads == 0); - g_mutex_free (queue->mutex); - g_cond_free (queue->cond); - g_queue_free (queue->queue); - g_free (queue); - } -} - -/** - * g_async_queue_unref: - * @queue: a #GAsyncQueue. - * - * Decreases the reference count of the asynchronous @queue by 1. If - * the reference count went to 0, the @queue will be destroyed and the - * memory allocated will be freed. So you are not allowed to use the - * @queue afterwards, as it might have disappeared. - **/ -void -g_async_queue_unref (GAsyncQueue *queue) -{ - g_return_if_fail (queue); - g_return_if_fail (queue->ref_count > 0); - - g_mutex_lock (queue->mutex); - g_async_queue_unref_and_unlock (queue); -} - -/** - * g_async_queue_lock: - * @queue: a #GAsyncQueue. - * - * Acquire the @queue's lock. After that you can only call the - * g_async_queue_*_unlocked function variants on that - * @queue. Otherwise it will deadlock. - **/ -void -g_async_queue_lock (GAsyncQueue *queue) -{ - g_return_if_fail (queue); - g_return_if_fail (queue->ref_count > 0); - - g_mutex_lock (queue->mutex); -} - -/** - * g_async_queue_unlock: - * @queue: a #GAsyncQueue. - * - * Release the queue's lock. - **/ -void -g_async_queue_unlock (GAsyncQueue *queue) -{ - g_return_if_fail (queue); - g_return_if_fail (queue->ref_count > 0); - - g_mutex_unlock (queue->mutex); -} - -/** - * g_async_queue_push: - * @queue: a #GAsyncQueue. - * @data: @data to push into the @queue. - * - * Push the @data into the @queue. @data must not be #NULL. - **/ -void -g_async_queue_push (GAsyncQueue* queue, gpointer data) -{ - g_return_if_fail (queue); - g_return_if_fail (queue->ref_count > 0); - g_return_if_fail (data); - - g_mutex_lock (queue->mutex); - g_async_queue_push_unlocked (queue, data); - g_mutex_unlock (queue->mutex); -} - -/** - * g_async_queue_push_unlocked: - * @queue: a #GAsyncQueue. - * @data: @data to push into the @queue. - * - * Push the @data into the @queue. @data must not be #NULL. This - * function must be called while holding the @queue's lock. - **/ -void -g_async_queue_push_unlocked (GAsyncQueue* queue, gpointer data) -{ - g_return_if_fail (queue); - g_return_if_fail (queue->ref_count > 0); - g_return_if_fail (data); - - g_queue_push_head (queue->queue, data); - g_cond_signal (queue->cond); -} - -static gpointer -g_async_queue_pop_intern_unlocked (GAsyncQueue* queue, gboolean try, - GTimeVal *end_time) -{ - gpointer retval; - - if (!g_queue_peek_tail (queue->queue)) - { - if (try) - return NULL; - if (!end_time) - { - queue->waiting_threads++; - while (!g_queue_peek_tail (queue->queue)) - g_cond_wait(queue->cond, queue->mutex); - queue->waiting_threads--; - } - else - { - queue->waiting_threads++; - while (!g_queue_peek_tail (queue->queue)) - if (!g_cond_timed_wait (queue->cond, queue->mutex, end_time)) - break; - queue->waiting_threads--; - if (!g_queue_peek_tail (queue->queue)) - return NULL; - } - } - - retval = g_queue_pop_tail (queue->queue); - - g_assert (retval); - - return retval; -} - -/** - * g_async_queue_pop: - * @queue: a #GAsyncQueue. - * - * Pop data from the @queue. This function blocks until data become - * available. - * - * Return value: data from the queue. - **/ -gpointer -g_async_queue_pop (GAsyncQueue* queue) -{ - gpointer retval; - - g_return_val_if_fail (queue, NULL); - g_return_val_if_fail (queue->ref_count > 0, NULL); - - g_mutex_lock (queue->mutex); - retval = g_async_queue_pop_intern_unlocked (queue, FALSE, NULL); - g_mutex_unlock (queue->mutex); - - return retval; -} - -/** - * g_async_queue_pop_unlocked: - * @queue: a #GAsyncQueue. - * - * Pop data from the @queue. This function blocks until data become - * available. This function must be called while holding the @queue's - * lock. - * - * Return value: data from the queue. - **/ -gpointer -g_async_queue_pop_unlocked (GAsyncQueue* queue) -{ - g_return_val_if_fail (queue, NULL); - g_return_val_if_fail (queue->ref_count > 0, NULL); - - return g_async_queue_pop_intern_unlocked (queue, FALSE, NULL); -} - -/** - * g_async_queue_try_pop: - * @queue: a #GAsyncQueue. - * - * Try to pop data from the @queue. If no data is available, #NULL is - * returned. - * - * Return value: data from the queue or #NULL, when no data is - * available immediately. - **/ -gpointer -g_async_queue_try_pop (GAsyncQueue* queue) -{ - gpointer retval; - - g_return_val_if_fail (queue, NULL); - g_return_val_if_fail (queue->ref_count > 0, NULL); - - g_mutex_lock (queue->mutex); - retval = g_async_queue_pop_intern_unlocked (queue, TRUE, NULL); - g_mutex_unlock (queue->mutex); - - return retval; -} - -/** - * g_async_queue_try_pop_unlocked: - * @queue: a #GAsyncQueue. - * - * Try to pop data from the @queue. If no data is available, #NULL is - * returned. This function must be called while holding the @queue's - * lock. - * - * Return value: data from the queue or #NULL, when no data is - * available immediately. - **/ -gpointer -g_async_queue_try_pop_unlocked (GAsyncQueue* queue) -{ - g_return_val_if_fail (queue, NULL); - g_return_val_if_fail (queue->ref_count > 0, NULL); - - return g_async_queue_pop_intern_unlocked (queue, TRUE, NULL); -} - -/** - * g_async_queue_timed_pop: - * @queue: a #GAsyncQueue. - * @end_time: a #GTimeVal, determining the final time. - * - * Pop data from the @queue. If no data is received before @end_time, - * #NULL is returned. - * - * To easily calculate @end_time a combination of g_get_current_time() - * and g_time_val_add() can be used. - * - * Return value: data from the queue or #NULL, when no data is - * received before @end_time. - **/ -gpointer -g_async_queue_timed_pop (GAsyncQueue* queue, GTimeVal *end_time) -{ - gpointer retval; - - g_return_val_if_fail (queue, NULL); - g_return_val_if_fail (queue->ref_count > 0, NULL); - - g_mutex_lock (queue->mutex); - retval = g_async_queue_pop_intern_unlocked (queue, FALSE, end_time); - g_mutex_unlock (queue->mutex); - - return retval; -} - -/** - * g_async_queue_timed_pop_unlocked: - * @queue: a #GAsyncQueue. - * @end_time: a #GTimeVal, determining the final time. - * - * Pop data from the @queue. If no data is received before @end_time, - * #NULL is returned. This function must be called while holding the - * @queue's lock. - * - * To easily calculate @end_time a combination of g_get_current_time() - * and g_time_val_add() can be used. - * - * Return value: data from the queue or #NULL, when no data is - * received before @end_time. - **/ -gpointer -g_async_queue_timed_pop_unlocked (GAsyncQueue* queue, GTimeVal *end_time) -{ - g_return_val_if_fail (queue, NULL); - g_return_val_if_fail (queue->ref_count > 0, NULL); - - return g_async_queue_pop_intern_unlocked (queue, FALSE, end_time); -} - -/** - * g_async_queue_length: - * @queue: a #GAsyncQueue. - * - * Returns the length of the queue, negative values mean waiting - * threads, positive values mean available entries in the - * @queue. Actually this function returns the number of data items in - * the queue minus the number of waiting threads. Thus a return value - * of 0 could mean 'n' entries in the queue and 'n' thread waiting. - * That can happen due to locking of the queue or due to - * scheduling. - * - * Return value: the length of the @queue. - **/ -gint -g_async_queue_length (GAsyncQueue* queue) -{ - gint retval; - - g_return_val_if_fail (queue, 0); - g_return_val_if_fail (queue->ref_count > 0, 0); - - g_mutex_lock (queue->mutex); - retval = queue->queue->length - queue->waiting_threads; - g_mutex_unlock (queue->mutex); - - return retval; -} - -/** - * g_async_queue_length_unlocked: - * @queue: a #GAsyncQueue. - * - * Returns the length of the queue, negative values mean waiting - * threads, positive values mean available entries in the - * @queue. Actually this function returns the number of data items in - * the queue minus the number of waiting threads. Thus a return value - * of 0 could mean 'n' entries in the queue and 'n' thread waiting. - * That can happen due to locking of the queue or due to - * scheduling. This function must be called while holding the @queue's - * lock. - * - * Return value: the length of the @queue. - **/ -gint -g_async_queue_length_unlocked (GAsyncQueue* queue) -{ - g_return_val_if_fail (queue, 0); - g_return_val_if_fail (queue->ref_count > 0, 0); - - return queue->queue->length - queue->waiting_threads; -} - diff --git a/gasyncqueue.h b/gasyncqueue.h deleted file mode 100644 index 6e87425f7..000000000 --- a/gasyncqueue.h +++ /dev/null @@ -1,95 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_ASYNCQUEUE_H__ -#define __G_ASYNCQUEUE_H__ - -#include <gthread.h> - -G_BEGIN_DECLS - -typedef struct _GAsyncQueue GAsyncQueue; - -/* Asyncronous Queues, can be used to communicate between threads - */ - -/* Get a new GAsyncQueue with the ref_count 1 */ -GAsyncQueue* g_async_queue_new (void); - -/* Lock and unlock an GAsyncQueue, all functions lock the queue for - * themselves, but in certain cirumstances you want to hold the lock longer, - * thus you lock the queue, call the *_unlocked functions and unlock it again - */ -void g_async_queue_lock (GAsyncQueue *queue); -void g_async_queue_unlock (GAsyncQueue *queue); - -/* Ref and unref the GAsyncQueue. g_async_queue_unref_unlocked makes - * no sense, as after the unreffing the Queue might be gone and can't - * be unlocked. So you have a function to call, if you don't hold the - * lock (g_async_queue_unref) and one to call, when you already hold - * the lock (g_async_queue_unref_and_unlock). After that however, you - * don't hold the lock anymore and the Queue might in fact be - * destroyed, if you unrefed to zero */ -void g_async_queue_ref (GAsyncQueue *queue); -void g_async_queue_ref_unlocked (GAsyncQueue *queue); -void g_async_queue_unref (GAsyncQueue *queue); -void g_async_queue_unref_and_unlock (GAsyncQueue *queue); - -/* Push data into the async queue. Must not be NULL */ -void g_async_queue_push (GAsyncQueue *queue, - gpointer data); -void g_async_queue_push_unlocked (GAsyncQueue *queue, - gpointer data); - -/* Pop data from the async queue, when no data is there, the thread is blocked - * until data arrives */ -gpointer g_async_queue_pop (GAsyncQueue *queue); -gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); - -/* Try to pop data, NULL is returned in case of empty queue */ -gpointer g_async_queue_try_pop (GAsyncQueue *queue); -gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); - -/* Wait for data until at maximum until end_time is reached, NULL is returned - * in case of empty queue*/ -gpointer g_async_queue_timed_pop (GAsyncQueue *queue, - GTimeVal *end_time); -gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, - GTimeVal *end_time); - -/* Return the length of the queue, negative values mean, that threads - * are waiting, positve values mean, that there are entries in the - * queue. Actually this function returns the length of the queue minus - * the number of waiting threads, g_async_queue_length == 0 could also - * mean 'n' entries in the queue and 'n' thread waiting, such can - * happen due to locking of the queue or due to scheduling. */ -gint g_async_queue_length (GAsyncQueue *queue); -gint g_async_queue_length_unlocked (GAsyncQueue *queue); - -G_END_DECLS - -#endif /* __G_ASYNCQUEUE_H__ */ - diff --git a/gbacktrace.c b/gbacktrace.c deleted file mode 100644 index 7d131af74..000000000 --- a/gbacktrace.c +++ /dev/null @@ -1,300 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe ; except for g_on_error_stack_trace, but who wants thread safety - * then - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <signal.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include "glib.h" -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#ifdef HAVE_SYS_TIMES_H -#include <sys/times.h> -#endif -#include <sys/types.h> - -#include <time.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#ifdef HAVE_SYS_SELECT_H -#include <sys/select.h> -#endif /* HAVE_SYS_SELECT_H */ - -#ifdef STDC_HEADERS -#include <string.h> /* for bzero on BSD systems */ -#endif - -#ifdef G_OS_WIN32 -# define STRICT /* Strict typing, please */ -# include <windows.h> -# undef STRICT -#endif - -#ifndef NO_FD_SET -# define SELECT_MASK fd_set -#else -# if defined(_IBMR2) -# define SELECT_MASK void -# else -# define SELECT_MASK int -# endif -#endif - - -#ifndef G_OS_WIN32 -static void stack_trace (char **args); -#endif - -extern volatile gboolean glib_on_error_halt; -volatile gboolean glib_on_error_halt = TRUE; - -void -g_on_error_query (const gchar *prg_name) -{ -#ifndef G_OS_WIN32 - static const gchar *query1 = "[E]xit, [H]alt"; - static const gchar *query2 = ", show [S]tack trace"; - static const gchar *query3 = " or [P]roceed"; - gchar buf[16]; - - if (!prg_name) - prg_name = g_get_prgname (); - - retry: - - if (prg_name) - fprintf (stdout, - "%s (pid:%u): %s%s%s: ", - prg_name, - (guint) getpid (), - query1, - query2, - query3); - else - fprintf (stdout, - "(process:%u): %s%s: ", - (guint) getpid (), - query1, - query3); - fflush (stdout); - - if (isatty(0) && isatty(1)) - fgets (buf, 8, stdin); - else - strcpy (buf, "E\n"); - - if ((buf[0] == 'E' || buf[0] == 'e') - && buf[1] == '\n') - _exit (0); - else if ((buf[0] == 'P' || buf[0] == 'p') - && buf[1] == '\n') - return; - else if (prg_name - && (buf[0] == 'S' || buf[0] == 's') - && buf[1] == '\n') - { - g_on_error_stack_trace (prg_name); - goto retry; - } - else if ((buf[0] == 'H' || buf[0] == 'h') - && buf[1] == '\n') - { - while (glib_on_error_halt) - ; - glib_on_error_halt = TRUE; - return; - } - else - goto retry; -#else - if (!prg_name) - prg_name = g_get_prgname (); - - MessageBox (NULL, "g_on_error_query called, program terminating", - (prg_name && *prg_name) ? prg_name : NULL, - MB_OK|MB_ICONERROR); - _exit(0); -#endif -} - -void -g_on_error_stack_trace (const gchar *prg_name) -{ -#ifdef G_OS_UNIX - pid_t pid; - gchar buf[16]; - gchar *args[4] = { "gdb", NULL, NULL, NULL }; - - if (!prg_name) - return; - - sprintf (buf, "%u", (guint) getpid ()); - - args[1] = (gchar*) prg_name; - args[2] = buf; - - pid = fork (); - if (pid == 0) - { - stack_trace (args); - _exit (0); - } - else if (pid == (pid_t) -1) - { - perror ("unable to fork gdb"); - return; - } - - while (glib_on_error_halt) - ; - glib_on_error_halt = TRUE; -#else - abort (); -#endif -} - -#ifndef G_OS_WIN32 - -static gboolean stack_trace_done = FALSE; - -static void -stack_trace_sigchld (int signum) -{ - stack_trace_done = TRUE; -} - -static void -stack_trace (char **args) -{ - pid_t pid; - int in_fd[2]; - int out_fd[2]; - SELECT_MASK fdset; - SELECT_MASK readset; - struct timeval tv; - int sel, index, state; - char buffer[256]; - char c; - - stack_trace_done = FALSE; - signal (SIGCHLD, stack_trace_sigchld); - - if ((pipe (in_fd) == -1) || (pipe (out_fd) == -1)) - { - perror ("unable to open pipe"); - _exit (0); - } - - pid = fork (); - if (pid == 0) - { - close (0); dup (in_fd[0]); /* set the stdin to the in pipe */ - close (1); dup (out_fd[1]); /* set the stdout to the out pipe */ - close (2); dup (out_fd[1]); /* set the stderr to the out pipe */ - - execvp (args[0], args); /* exec gdb */ - perror ("exec failed"); - _exit (0); - } - else if (pid == (pid_t) -1) - { - perror ("unable to fork"); - _exit (0); - } - - FD_ZERO (&fdset); - FD_SET (out_fd[0], &fdset); - - write (in_fd[1], "backtrace\n", 10); - write (in_fd[1], "p x = 0\n", 8); - write (in_fd[1], "quit\n", 5); - - index = 0; - state = 0; - - while (1) - { - readset = fdset; - tv.tv_sec = 1; - tv.tv_usec = 0; - - sel = select (FD_SETSIZE, &readset, NULL, NULL, &tv); - if (sel == -1) - break; - - if ((sel > 0) && (FD_ISSET (out_fd[0], &readset))) - { - if (read (out_fd[0], &c, 1)) - { - switch (state) - { - case 0: - if (c == '#') - { - state = 1; - index = 0; - buffer[index++] = c; - } - break; - case 1: - buffer[index++] = c; - if ((c == '\n') || (c == '\r')) - { - buffer[index] = 0; - fprintf (stdout, "%s", buffer); - state = 0; - index = 0; - } - break; - default: - break; - } - } - } - else if (stack_trace_done) - break; - } - - close (in_fd[0]); - close (in_fd[1]); - close (out_fd[0]); - close (out_fd[1]); - _exit (0); -} - -#endif /* !G_OS_WIN32 */ diff --git a/gbacktrace.h b/gbacktrace.h deleted file mode 100644 index 25d2f9987..000000000 --- a/gbacktrace.h +++ /dev/null @@ -1,61 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_BACKTRACE_H__ -#define __G_BACKTRACE_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -/* Fatal error handlers. - * g_on_error_query() will prompt the user to either - * [E]xit, [H]alt, [P]roceed or show [S]tack trace. - * g_on_error_stack_trace() invokes gdb, which attaches to the current - * process and shows a stack trace. - * These function may cause different actions on non-unix platforms. - * The prg_name arg is required by gdb to find the executable, if it is - * passed as NULL, g_on_error_query() will try g_get_prgname(). - */ -void g_on_error_query (const gchar *prg_name); -void g_on_error_stack_trace (const gchar *prg_name); - -/* Hacker macro to place breakpoints for elected machines. - * Actual use is strongly deprecated of course ;) - */ -#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 -# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("int $03"); }G_STMT_END -#elif defined (_MSC_VER) && defined (_M_IX86) -# define G_BREAKPOINT() G_STMT_START{ __asm int 3h }G_STMT_END -#elif defined (__alpha__) && defined (__GNUC__) && __GNUC__ >= 2 -# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("bpt"); }G_STMT_END -#else /* !__i386__ && !__alpha__ */ -# define G_BREAKPOINT() G_STMT_START{ raise (5 /* SIGTRAP */); }G_STMT_END -#endif /* __i386__ */ - -G_END_DECLS - -#endif /* __G_BACKTRACE_H__ */ diff --git a/gcache.c b/gcache.c deleted file mode 100644 index 5a06e0eeb..000000000 --- a/gcache.c +++ /dev/null @@ -1,230 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "glib.h" - - -typedef struct _GCacheNode GCacheNode; -typedef struct _GRealCache GRealCache; - -struct _GCacheNode -{ - /* A reference counted node */ - gpointer value; - gint ref_count; -}; - -struct _GRealCache -{ - /* Called to create a value from a key */ - GCacheNewFunc value_new_func; - - /* Called to destroy a value */ - GCacheDestroyFunc value_destroy_func; - - /* Called to duplicate a key */ - GCacheDupFunc key_dup_func; - - /* Called to destroy a key */ - GCacheDestroyFunc key_destroy_func; - - /* Associates keys with nodes */ - GHashTable *key_table; - - /* Associates nodes with keys */ - GHashTable *value_table; -}; - - -static GCacheNode* g_cache_node_new (gpointer value); -static void g_cache_node_destroy (GCacheNode *node); - - -static GMemChunk *node_mem_chunk = NULL; -G_LOCK_DEFINE_STATIC (node_mem_chunk); - -GCache* -g_cache_new (GCacheNewFunc value_new_func, - GCacheDestroyFunc value_destroy_func, - GCacheDupFunc key_dup_func, - GCacheDestroyFunc key_destroy_func, - GHashFunc hash_key_func, - GHashFunc hash_value_func, - GEqualFunc key_equal_func) -{ - GRealCache *cache; - - g_return_val_if_fail (value_new_func != NULL, NULL); - g_return_val_if_fail (value_destroy_func != NULL, NULL); - g_return_val_if_fail (key_dup_func != NULL, NULL); - g_return_val_if_fail (key_destroy_func != NULL, NULL); - g_return_val_if_fail (hash_key_func != NULL, NULL); - g_return_val_if_fail (hash_value_func != NULL, NULL); - g_return_val_if_fail (key_equal_func != NULL, NULL); - - cache = g_new (GRealCache, 1); - cache->value_new_func = value_new_func; - cache->value_destroy_func = value_destroy_func; - cache->key_dup_func = key_dup_func; - cache->key_destroy_func = key_destroy_func; - cache->key_table = g_hash_table_new (hash_key_func, key_equal_func); - cache->value_table = g_hash_table_new (hash_value_func, NULL); - - return (GCache*) cache; -} - -void -g_cache_destroy (GCache *cache) -{ - GRealCache *rcache; - - g_return_if_fail (cache != NULL); - - rcache = (GRealCache*) cache; - g_hash_table_destroy (rcache->key_table); - g_hash_table_destroy (rcache->value_table); - g_free (rcache); -} - -gpointer -g_cache_insert (GCache *cache, - gpointer key) -{ - GRealCache *rcache; - GCacheNode *node; - gpointer value; - - g_return_val_if_fail (cache != NULL, NULL); - - rcache = (GRealCache*) cache; - - node = g_hash_table_lookup (rcache->key_table, key); - if (node) - { - node->ref_count += 1; - return node->value; - } - - key = (* rcache->key_dup_func) (key); - value = (* rcache->value_new_func) (key); - node = g_cache_node_new (value); - - g_hash_table_insert (rcache->key_table, key, node); - g_hash_table_insert (rcache->value_table, value, key); - - return node->value; -} - -void -g_cache_remove (GCache *cache, - gconstpointer value) -{ - GRealCache *rcache; - GCacheNode *node; - gpointer key; - - g_return_if_fail (cache != NULL); - - rcache = (GRealCache*) cache; - - key = g_hash_table_lookup (rcache->value_table, value); - node = g_hash_table_lookup (rcache->key_table, key); - - g_return_if_fail (node != NULL); - - node->ref_count -= 1; - if (node->ref_count == 0) - { - g_hash_table_remove (rcache->value_table, value); - g_hash_table_remove (rcache->key_table, key); - - (* rcache->key_destroy_func) (key); - (* rcache->value_destroy_func) (node->value); - g_cache_node_destroy (node); - } -} - -void -g_cache_key_foreach (GCache *cache, - GHFunc func, - gpointer user_data) -{ - GRealCache *rcache; - - g_return_if_fail (cache != NULL); - g_return_if_fail (func != NULL); - - rcache = (GRealCache*) cache; - - g_hash_table_foreach (rcache->value_table, func, user_data); -} - -void -g_cache_value_foreach (GCache *cache, - GHFunc func, - gpointer user_data) -{ - GRealCache *rcache; - - g_return_if_fail (cache != NULL); - g_return_if_fail (func != NULL); - - rcache = (GRealCache*) cache; - - g_hash_table_foreach (rcache->key_table, func, user_data); -} - - -static GCacheNode* -g_cache_node_new (gpointer value) -{ - GCacheNode *node; - - G_LOCK (node_mem_chunk); - if (!node_mem_chunk) - node_mem_chunk = g_mem_chunk_new ("cache node mem chunk", sizeof (GCacheNode), - 1024, G_ALLOC_AND_FREE); - - node = g_chunk_new (GCacheNode, node_mem_chunk); - G_UNLOCK (node_mem_chunk); - - node->value = value; - node->ref_count = 1; - - return node; -} - -static void -g_cache_node_destroy (GCacheNode *node) -{ - G_LOCK (node_mem_chunk); - g_mem_chunk_free (node_mem_chunk, node); - G_UNLOCK (node_mem_chunk); -} diff --git a/gcache.h b/gcache.h deleted file mode 100644 index 74ef5b654..000000000 --- a/gcache.h +++ /dev/null @@ -1,66 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_CACHE_H__ -#define __G_CACHE_H__ - -#include <glist.h> - -G_BEGIN_DECLS - -typedef struct _GCache GCache; - -typedef gpointer (*GCacheNewFunc) (gpointer key); -typedef gpointer (*GCacheDupFunc) (gpointer value); -typedef void (*GCacheDestroyFunc) (gpointer value); - -/* Caches - */ -GCache* g_cache_new (GCacheNewFunc value_new_func, - GCacheDestroyFunc value_destroy_func, - GCacheDupFunc key_dup_func, - GCacheDestroyFunc key_destroy_func, - GHashFunc hash_key_func, - GHashFunc hash_value_func, - GEqualFunc key_equal_func); -void g_cache_destroy (GCache *cache); -gpointer g_cache_insert (GCache *cache, - gpointer key); -void g_cache_remove (GCache *cache, - gconstpointer value); -void g_cache_key_foreach (GCache *cache, - GHFunc func, - gpointer user_data); -void g_cache_value_foreach (GCache *cache, - GHFunc func, - gpointer user_data); - -G_END_DECLS - -#endif /* __G_CACHE_H__ */ - - - diff --git a/gcompletion.c b/gcompletion.c deleted file mode 100644 index 1e882dcaa..000000000 --- a/gcompletion.c +++ /dev/null @@ -1,296 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "glib.h" -#include <string.h> - -static void completion_check_cache (GCompletion* cmp, - gchar** new_prefix); - -GCompletion* -g_completion_new (GCompletionFunc func) -{ - GCompletion* gcomp; - - gcomp = g_new (GCompletion, 1); - gcomp->items = NULL; - gcomp->cache = NULL; - gcomp->prefix = NULL; - gcomp->func = func; - gcomp->strncmp_func = strncmp; - - return gcomp; -} - -void -g_completion_add_items (GCompletion* cmp, - GList* items) -{ - GList* it; - - g_return_if_fail (cmp != NULL); - g_return_if_fail (items != NULL); - - /* optimize adding to cache? */ - if (cmp->cache) - { - g_list_free (cmp->cache); - cmp->cache = NULL; - } - - if (cmp->prefix) - { - g_free (cmp->prefix); - cmp->prefix = NULL; - } - - it = items; - while (it) - { - cmp->items = g_list_prepend (cmp->items, it->data); - it = it->next; - } -} - -void -g_completion_remove_items (GCompletion* cmp, - GList* items) -{ - GList* it; - - g_return_if_fail (cmp != NULL); - g_return_if_fail (items != NULL); - - it = items; - while (cmp->items && it) - { - cmp->items = g_list_remove (cmp->items, it->data); - it = it->next; - } - - it = items; - while (cmp->cache && it) - { - cmp->cache = g_list_remove(cmp->cache, it->data); - it = it->next; - } -} - -void -g_completion_clear_items (GCompletion* cmp) -{ - g_return_if_fail (cmp != NULL); - - g_list_free (cmp->items); - cmp->items = NULL; - g_list_free (cmp->cache); - cmp->cache = NULL; - g_free (cmp->prefix); - cmp->prefix = NULL; -} - -static void -completion_check_cache (GCompletion* cmp, - gchar** new_prefix) -{ - register GList* list; - register gsize len; - register gsize i; - register gsize plen; - gchar* postfix; - gchar* s; - - if (!new_prefix) - return; - if (!cmp->cache) - { - *new_prefix = NULL; - return; - } - - len = strlen(cmp->prefix); - list = cmp->cache; - s = cmp->func ? cmp->func (list->data) : (gchar*) list->data; - postfix = s + len; - plen = strlen (postfix); - list = list->next; - - while (list && plen) - { - s = cmp->func ? cmp->func (list->data) : (gchar*) list->data; - s += len; - for (i = 0; i < plen; ++i) - { - if (postfix[i] != s[i]) - break; - } - plen = i; - list = list->next; - } - - *new_prefix = g_new0 (gchar, len + plen + 1); - strncpy (*new_prefix, cmp->prefix, len); - strncpy (*new_prefix + len, postfix, plen); -} - -GList* -g_completion_complete (GCompletion* cmp, - gchar* prefix, - gchar** new_prefix) -{ - gsize plen, len; - gboolean done = FALSE; - GList* list; - - g_return_val_if_fail (cmp != NULL, NULL); - g_return_val_if_fail (prefix != NULL, NULL); - - len = strlen (prefix); - if (cmp->prefix && cmp->cache) - { - plen = strlen (cmp->prefix); - if (plen <= len && ! cmp->strncmp_func (prefix, cmp->prefix, plen)) - { - /* use the cache */ - list = cmp->cache; - while (list) - { - if (cmp->strncmp_func (prefix, - cmp->func ? cmp->func (list->data) : (gchar*) list->data, - len)) - { - list = g_list_remove_link (cmp->cache, list); - if (list != cmp->cache) - cmp->cache = list; - } - else - list = list->next; - } - done = TRUE; - } - } - - if (!done) - { - /* normal code */ - g_list_free (cmp->cache); - cmp->cache = NULL; - list = cmp->items; - while (*prefix && list) - { - if (!cmp->strncmp_func (prefix, - cmp->func ? cmp->func (list->data) : (gchar*) list->data, - len)) - cmp->cache = g_list_prepend (cmp->cache, list->data); - list = list->next; - } - } - if (cmp->prefix) - { - g_free (cmp->prefix); - cmp->prefix = NULL; - } - if (cmp->cache) - cmp->prefix = g_strdup (prefix); - completion_check_cache (cmp, new_prefix); - - return *prefix ? cmp->cache : cmp->items; -} - -void -g_completion_free (GCompletion* cmp) -{ - g_return_if_fail (cmp != NULL); - - g_completion_clear_items (cmp); - g_free (cmp); -} - -void -g_completion_set_compare(GCompletion *cmp, - GCompletionStrncmpFunc strncmp_func) -{ - cmp->strncmp_func = strncmp_func; -} - -#ifdef TEST_COMPLETION -#include <stdio.h> -int -main (int argc, - char* argv[]) -{ - FILE *file; - gchar buf[1024]; - GList *list; - GList *result; - GList *tmp; - GCompletion *cmp; - gint i; - gchar *longp = NULL; - - if (argc < 3) - { - g_warning ("Usage: %s filename prefix1 [prefix2 ...]\n", argv[0]); - return 1; - } - - file = fopen (argv[1], "r"); - if (!file) - { - g_warning ("Cannot open %s\n", argv[1]); - return 1; - } - - cmp = g_completion_new (NULL); - list = g_list_alloc (); - while (fgets (buf, 1024, file)) - { - list->data = g_strdup (buf); - g_completion_add_items (cmp, list); - } - fclose (file); - - for (i = 2; i < argc; ++i) - { - printf ("COMPLETING: %s\n", argv[i]); - result = g_completion_complete (cmp, argv[i], &longp); - g_list_foreach (result, (GFunc) printf, NULL); - printf ("LONG MATCH: %s\n", longp); - g_free (longp); - longp = NULL; - } - - g_list_foreach (cmp->items, (GFunc) g_free, NULL); - g_completion_free (cmp); - g_list_free (list); - - return 0; -} -#endif diff --git a/gcompletion.h b/gcompletion.h deleted file mode 100644 index 3aade5322..000000000 --- a/gcompletion.h +++ /dev/null @@ -1,71 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_COMPLETION_H__ -#define __G_COMPLETION_H__ - -#include <glist.h> - -G_BEGIN_DECLS - -typedef struct _GCompletion GCompletion; - -typedef gchar* (*GCompletionFunc) (gpointer); - -/* GCompletion - */ - -typedef gint (*GCompletionStrncmpFunc) (const gchar *s1, - const gchar *s2, - gsize n); - -struct _GCompletion -{ - GList* items; - GCompletionFunc func; - - gchar* prefix; - GList* cache; - GCompletionStrncmpFunc strncmp_func; -}; - -GCompletion* g_completion_new (GCompletionFunc func); -void g_completion_add_items (GCompletion* cmp, - GList* items); -void g_completion_remove_items (GCompletion* cmp, - GList* items); -void g_completion_clear_items (GCompletion* cmp); -GList* g_completion_complete (GCompletion* cmp, - gchar* prefix, - gchar** new_prefix); -void g_completion_set_compare (GCompletion *cmp, - GCompletionStrncmpFunc strncmp_func); -void g_completion_free (GCompletion* cmp); - -G_END_DECLS - -#endif /* __G_COMPLETION_H__ */ - diff --git a/gconvert.c b/gconvert.c deleted file mode 100644 index 2a4cbebd8..000000000 --- a/gconvert.c +++ /dev/null @@ -1,916 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * - * gconvert.c: Convert between character sets using iconv - * Copyright Red Hat Inc., 2000 - * Authors: Havoc Pennington <hp@redhat.com>, Owen Taylor <otaylor@redhat.com - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include <iconv.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> - -#include "glib.h" -#include "config.h" - -#ifdef G_PLATFORM_WIN32 -#define STRICT -#include <windows.h> -#undef STRICT -#endif - -#include "glibintl.h" - -GQuark -g_convert_error_quark() -{ - static GQuark quark; - if (!quark) - quark = g_quark_from_static_string ("g_convert_error"); - - return quark; -} - -#if defined(USE_LIBICONV) && !defined (_LIBICONV_H) -#error libiconv in use but included iconv.h not from libiconv -#endif -#if !defined(USE_LIBICONV) && defined (_LIBICONV_H) -#error libiconv not in use but included iconv.h is from libiconv -#endif - -/** - * g_iconv_open: - * @to_codeset: destination codeset - * @from_codeset: source codeset - * - * Same as the standard UNIX routine iconv_open(), but - * may be implemented via libiconv on UNIX flavors that lack - * a native implementation. - * - * GLib provides g_convert() and g_locale_to_utf8() which are likely - * more convenient than the raw iconv wrappers. - * - * Return value: a "conversion descriptor" - **/ -GIConv -g_iconv_open (const gchar *to_codeset, - const gchar *from_codeset) -{ - iconv_t cd = iconv_open (to_codeset, from_codeset); - - return (GIConv)cd; -} - -/** - * g_iconv: - * @converter: conversion descriptor from g_iconv_open() - * @inbuf: bytes to convert - * @inbytes_left: inout parameter, bytes remaining to convert in @inbuf - * @outbuf: converted output bytes - * @outbytes_left: inout parameter, bytes available to fill in @outbuf - * - * Same as the standard UNIX routine iconv(), but - * may be implemented via libiconv on UNIX flavors that lack - * a native implementation. - * - * GLib provides g_convert() and g_locale_to_utf8() which are likely - * more convenient than the raw iconv wrappers. - * - * Return value: count of non-reversible conversions, or -1 on error - **/ -size_t -g_iconv (GIConv converter, - gchar **inbuf, - gsize *inbytes_left, - gchar **outbuf, - gsize *outbytes_left) -{ - iconv_t cd = (iconv_t)converter; - - return iconv (cd, inbuf, inbytes_left, outbuf, outbytes_left); -} - -/** - * g_iconv_close: - * @converter: a conversion descriptor from g_iconv_open() - * - * Same as the standard UNIX routine iconv_close(), but - * may be implemented via libiconv on UNIX flavors that lack - * a native implementation. Should be called to clean up - * the conversion descriptor from iconv_open() when - * you are done converting things. - * - * GLib provides g_convert() and g_locale_to_utf8() which are likely - * more convenient than the raw iconv wrappers. - * - * Return value: -1 on error, 0 on success - **/ -gint -g_iconv_close (GIConv converter) -{ - iconv_t cd = (iconv_t)converter; - - return iconv_close (cd); -} - -static GIConv -open_converter (const gchar *to_codeset, - const gchar *from_codeset, - GError **error) -{ - GIConv cd = g_iconv_open (to_codeset, from_codeset); - - if (cd == (iconv_t) -1) - { - /* Something went wrong. */ - if (errno == EINVAL) - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_NO_CONVERSION, - _("Conversion from character set `%s' to `%s' is not supported"), - from_codeset, to_codeset); - else - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED, - _("Could not open converter from `%s' to `%s': %s"), - from_codeset, to_codeset, strerror (errno)); - } - - return cd; - -} - -/** - * g_convert: - * @str: the string to convert - * @len: the length of the string - * @to_codeset: name of character set into which to convert @str - * @from_codeset: character set of @str. - * @bytes_read: location to store the number of bytes in the - * input string that were successfully converted, or %NULL. - * Even if the conversion was succesful, this may be - * less than len if there were partial characters - * at the end of the input. If the error - * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - * stored will the byte fofset after the last valid - * input sequence. - * @bytes_written: the stored in the output buffer (not including the - * terminating nul. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError may occur. - * - * Convert a string from one character set to another. - * - * Return value: If the conversion was successful, a newly allocated - * NUL-terminated string, which must be freed with - * g_free. Otherwise %NULL and @error will be set. - **/ -gchar* -g_convert (const gchar *str, - gssize len, - const gchar *to_codeset, - const gchar *from_codeset, - gsize *bytes_read, - gsize *bytes_written, - GError **error) -{ - gchar *dest; - gchar *outp; - const gchar *p; - gsize inbytes_remaining; - gsize outbytes_remaining; - gsize err; - GIConv cd; - gsize outbuf_size; - gboolean have_error = FALSE; - - g_return_val_if_fail (str != NULL, NULL); - g_return_val_if_fail (to_codeset != NULL, NULL); - g_return_val_if_fail (from_codeset != NULL, NULL); - - cd = open_converter (to_codeset, from_codeset, error); - - if (cd == (GIConv) -1) - { - if (bytes_read) - *bytes_read = 0; - - if (bytes_written) - *bytes_written = 0; - - return NULL; - } - - if (len < 0) - len = strlen (str); - - p = str; - inbytes_remaining = len; - outbuf_size = len + 1; /* + 1 for nul in case len == 1 */ - - outbytes_remaining = outbuf_size - 1; /* -1 for nul */ - outp = dest = g_malloc (outbuf_size); - - again: - - err = g_iconv (cd, (char **)&p, &inbytes_remaining, &outp, &outbytes_remaining); - - if (err == (size_t) -1) - { - switch (errno) - { - case EINVAL: - /* Incomplete text, do not report an error */ - break; - case E2BIG: - { - size_t used = outp - dest; - - outbuf_size *= 2; - dest = g_realloc (dest, outbuf_size); - - outp = dest + used; - outbytes_remaining = outbuf_size - used - 1; /* -1 for nul */ - - goto again; - } - case EILSEQ: - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid byte sequence in conversion input")); - have_error = TRUE; - break; - default: - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED, - _("Error during conversion: %s"), - strerror (errno)); - have_error = TRUE; - break; - } - } - - *outp = '\0'; - - g_iconv_close (cd); - - if (bytes_read) - *bytes_read = p - str; - else - { - if ((p - str) != len) - { - if (!have_error) - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT, - _("Partial character sequence at end of input")); - have_error = TRUE; - } - } - } - - if (bytes_written) - *bytes_written = outp - dest; /* Doesn't include '\0' */ - - if (have_error) - { - g_free (dest); - return NULL; - } - else - return dest; -} - -/** - * g_convert_with_fallback: - * @str: the string to convert - * @len: the length of the string - * @to_codeset: name of character set into which to convert @str - * @from_codeset: character set of @str. - * @fallback: UTF-8 string to use in place of character not - * present in the target encoding. (This must be - * in the target encoding), if %NULL, characters - * not in the target encoding will be represented - * as Unicode escapes \x{XXXX} or \x{XXXXXX}. - * @bytes_read: location to store the number of bytes in the - * input string that were successfully converted, or %NULL. - * Even if the conversion was succesful, this may be - * less than len if there were partial characters - * at the end of the input. - * @bytes_written: the stored in the output buffer (not including the - * terminating nul. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError may occur. - * - * Convert a string from one character set to another, possibly - * including fallback sequences for characters not representable - * in the output. Note that it is not guaranteed that the specification - * for the fallback sequences in @fallback will be honored. Some - * systems may do a approximate conversion from @from_codeset - * to @to_codeset in their iconv() functions, in which case GLib - * will simply return that approximate conversion. - * - * Return value: If the conversion was successful, a newly allocated - * NUL-terminated string, which must be freed with - * g_free. Otherwise %NULL and @error will be set. - **/ -gchar* -g_convert_with_fallback (const gchar *str, - gssize len, - const gchar *to_codeset, - const gchar *from_codeset, - gchar *fallback, - gsize *bytes_read, - gsize *bytes_written, - GError **error) -{ - gchar *utf8; - gchar *dest; - gchar *outp; - const gchar *insert_str = NULL; - const gchar *p; - gsize inbytes_remaining; - const gchar *save_p = NULL; - gsize save_inbytes = 0; - gsize outbytes_remaining; - gsize err; - GIConv cd; - gsize outbuf_size; - gboolean have_error = FALSE; - gboolean done = FALSE; - - GError *local_error = NULL; - - g_return_val_if_fail (str != NULL, NULL); - g_return_val_if_fail (to_codeset != NULL, NULL); - g_return_val_if_fail (from_codeset != NULL, NULL); - - if (len < 0) - len = strlen (str); - - /* Try an exact conversion; we only proceed if this fails - * due to an illegal sequence in the input string. - */ - dest = g_convert (str, len, to_codeset, from_codeset, - bytes_read, bytes_written, &local_error); - if (!local_error) - return dest; - - if (!g_error_matches (local_error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) - { - g_propagate_error (error, local_error); - return NULL; - } - else - g_error_free (local_error); - - local_error = NULL; - - /* No go; to proceed, we need a converter from "UTF-8" to - * to_codeset, and the string as UTF-8. - */ - cd = open_converter (to_codeset, "UTF-8", error); - if (cd == (GIConv) -1) - { - if (bytes_read) - *bytes_read = 0; - - if (bytes_written) - *bytes_written = 0; - - return NULL; - } - - utf8 = g_convert (str, len, "UTF-8", from_codeset, - bytes_read, &inbytes_remaining, error); - if (!utf8) - return NULL; - - /* Now the heart of the code. We loop through the UTF-8 string, and - * whenever we hit an offending character, we form fallback, convert - * the fallback to the target codeset, and then go back to - * converting the original string after finishing with the fallback. - * - * The variables save_p and save_inbytes store the input state - * for the original string while we are converting the fallback - */ - p = utf8; - - outbuf_size = len + 1; /* + 1 for nul in case len == 1 */ - outbytes_remaining = outbuf_size - 1; /* -1 for nul */ - outp = dest = g_malloc (outbuf_size); - - while (!done && !have_error) - { - size_t inbytes_tmp = inbytes_remaining; - err = g_iconv (cd, (char **)&p, &inbytes_tmp, &outp, &outbytes_remaining); - inbytes_remaining = inbytes_tmp; - - if (err == (size_t) -1) - { - switch (errno) - { - case EINVAL: - g_assert_not_reached(); - break; - case E2BIG: - { - size_t used = outp - dest; - - outbuf_size *= 2; - dest = g_realloc (dest, outbuf_size); - - outp = dest + used; - outbytes_remaining = outbuf_size - used - 1; /* -1 for nul */ - - break; - } - case EILSEQ: - if (save_p) - { - /* Error converting fallback string - fatal - */ - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Cannot convert fallback '%s' to codeset '%s'"), - insert_str, to_codeset); - have_error = TRUE; - break; - } - else - { - if (!fallback) - { - gunichar ch = g_utf8_get_char (p); - insert_str = g_strdup_printf ("\\x{%0*X}", - (ch < 0x10000) ? 4 : 6, - ch); - } - else - insert_str = fallback; - - save_p = g_utf8_next_char (p); - save_inbytes = inbytes_remaining - (save_p - p); - p = insert_str; - inbytes_remaining = strlen (p); - } - break; - default: - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED, - _("Error during conversion: %s"), - strerror (errno)); - have_error = TRUE; - break; - } - } - else - { - if (save_p) - { - if (!fallback) - g_free ((gchar *)insert_str); - p = save_p; - inbytes_remaining = save_inbytes; - save_p = NULL; - } - else - done = TRUE; - } - } - - /* Cleanup - */ - *outp = '\0'; - - g_iconv_close (cd); - - if (bytes_written) - *bytes_written = outp - str; /* Doesn't include '\0' */ - - g_free (utf8); - - if (have_error) - { - if (save_p && !fallback) - g_free ((gchar *)insert_str); - g_free (dest); - return NULL; - } - else - return dest; -} - -/* - * g_locale_to_utf8 - * - * - */ - -static gchar * -strdup_len (const gchar *string, - gssize len, - gsize *bytes_written, - gsize *bytes_read) - -{ - gsize real_len; - - if (len < 0) - real_len = strlen (string); - else - { - real_len = 0; - - while (real_len < len && string[real_len]) - real_len++; - } - - if (bytes_read) - *bytes_read = real_len; - if (bytes_written) - *bytes_written = real_len; - - return g_strndup (string, real_len); -} - -/** - * g_locale_to_utf8: - * @opsysstring: a string in the encoding of the current locale - * @len: the length of the string, or -1 if the string is - * NULL-terminated. - * @bytes_read: location to store the number of bytes in the - * input string that were successfully converted, or %NULL. - * Even if the conversion was succesful, this may be - * less than len if there were partial characters - * at the end of the input. If the error - * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - * stored will the byte fofset after the last valid - * input sequence. - * @bytes_written: the stored in the output buffer (not including the - * terminating nul. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError may occur. - * - * Converts a string which is in the encoding used for strings by - * the C runtime (usually the same as that used by the operating - * system) in the current locale into a UTF-8 string. - * - * Return value: The converted string, or %NULL on an error. - **/ -gchar * -g_locale_to_utf8 (const gchar *opsysstring, - gssize len, - gsize *bytes_read, - gsize *bytes_written, - GError **error) -{ -#ifdef G_PLATFORM_WIN32 - - gint i, clen, total_len, wclen, first; - wchar_t *wcs, wc; - gchar *result, *bp; - const wchar_t *wcp; - - if (len == -1) - len = strlen (opsysstring); - - wcs = g_new (wchar_t, len); - wclen = MultiByteToWideChar (CP_ACP, 0, opsysstring, len, wcs, len); - - wcp = wcs; - total_len = 0; - for (i = 0; i < wclen; i++) - { - wc = *wcp++; - - if (wc < 0x80) - total_len += 1; - else if (wc < 0x800) - total_len += 2; - else if (wc < 0x10000) - total_len += 3; - else if (wc < 0x200000) - total_len += 4; - else if (wc < 0x4000000) - total_len += 5; - else - total_len += 6; - } - - result = g_malloc (total_len + 1); - - wcp = wcs; - bp = result; - for (i = 0; i < wclen; i++) - { - wc = *wcp++; - - if (wc < 0x80) - { - first = 0; - clen = 1; - } - else if (wc < 0x800) - { - first = 0xc0; - clen = 2; - } - else if (wc < 0x10000) - { - first = 0xe0; - clen = 3; - } - else if (wc < 0x200000) - { - first = 0xf0; - clen = 4; - } - else if (wc < 0x4000000) - { - first = 0xf8; - clen = 5; - } - else - { - first = 0xfc; - clen = 6; - } - - /* Woo-hoo! */ - switch (clen) - { - case 6: bp[5] = (wc & 0x3f) | 0x80; wc >>= 6; /* Fall through */ - case 5: bp[4] = (wc & 0x3f) | 0x80; wc >>= 6; /* Fall through */ - case 4: bp[3] = (wc & 0x3f) | 0x80; wc >>= 6; /* Fall through */ - case 3: bp[2] = (wc & 0x3f) | 0x80; wc >>= 6; /* Fall through */ - case 2: bp[1] = (wc & 0x3f) | 0x80; wc >>= 6; /* Fall through */ - case 1: bp[0] = wc | first; - } - - bp += clen; - } - *bp = 0; - - g_free (wcs); - - if (bytes_read) - *bytes_read = len; - if (bytes_written) - *bytes_written = total_len; - - return result; - -#else /* !G_PLATFORM_WIN32 */ - - const char *charset; - - if (g_get_charset (&charset)) - return strdup_len (opsysstring, len, bytes_read, bytes_written); - else - return g_convert (opsysstring, len, - "UTF-8", charset, bytes_read, bytes_written, error); - -#endif /* !G_PLATFORM_WIN32 */ -} - -/** - * g_locale_from_utf8: - * @utf8string: a UTF-8 encoded string - * @len: the length of the string, or -1 if the string is - * NULL-terminated. - * @bytes_read: location to store the number of bytes in the - * input string that were successfully converted, or %NULL. - * Even if the conversion was succesful, this may be - * less than len if there were partial characters - * at the end of the input. If the error - * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - * stored will the byte fofset after the last valid - * input sequence. - * @bytes_written: the stored in the output buffer (not including the - * terminating nul. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError may occur. - * - * Converts a string from UTF-8 to the encoding used for strings by - * the C runtime (usually the same as that used by the operating - * system) in the current locale. - * - * Return value: The converted string, or %NULL on an error. - **/ -gchar * -g_locale_from_utf8 (const gchar *utf8string, - gssize len, - gsize *bytes_read, - gsize *bytes_written, - GError **error) -{ -#ifdef G_PLATFORM_WIN32 - - gint i, mask, clen, mblen; - wchar_t *wcs, *wcp; - gchar *result; - guchar *cp, *end, c; - gint n; - - if (len == -1) - len = strlen (utf8string); - - /* First convert to wide chars */ - cp = (guchar *) utf8string; - end = cp + len; - n = 0; - wcs = g_new (wchar_t, len + 1); - wcp = wcs; - while (cp != end) - { - mask = 0; - c = *cp; - - if (c < 0x80) - { - clen = 1; - mask = 0x7f; - } - else if ((c & 0xe0) == 0xc0) - { - clen = 2; - mask = 0x1f; - } - else if ((c & 0xf0) == 0xe0) - { - clen = 3; - mask = 0x0f; - } - else if ((c & 0xf8) == 0xf0) - { - clen = 4; - mask = 0x07; - } - else if ((c & 0xfc) == 0xf8) - { - clen = 5; - mask = 0x03; - } - else if ((c & 0xfc) == 0xfc) - { - clen = 6; - mask = 0x01; - } - else - { - g_free (wcs); - return NULL; - } - - if (cp + clen > end) - { - g_free (wcs); - return NULL; - } - - *wcp = (cp[0] & mask); - for (i = 1; i < clen; i++) - { - if ((cp[i] & 0xc0) != 0x80) - { - g_free (wcs); - return NULL; - } - *wcp <<= 6; - *wcp |= (cp[i] & 0x3f); - } - - cp += clen; - wcp++; - n++; - } - if (cp != end) - { - g_free (wcs); - return NULL; - } - - /* n is the number of wide chars constructed */ - - /* Convert to a string in the current ANSI codepage */ - - result = g_new (gchar, 3 * n + 1); - mblen = WideCharToMultiByte (CP_ACP, 0, wcs, n, result, 3*n, NULL, NULL); - result[mblen] = 0; - g_free (wcs); - - if (bytes_read) - *bytes_read = len; - if (bytes_written) - *bytes_written = mblen; - - return result; - -#else /* !G_PLATFORM_WIN32 */ - - const gchar *charset; - - if (g_get_charset (&charset)) - return strdup_len (utf8string, len, bytes_read, bytes_written); - else - return g_convert (utf8string, len, - charset, "UTF-8", bytes_read, bytes_written, error); - -#endif /* !G_PLATFORM_WIN32 */ -} - -/** - * g_filename_to_utf8: - * @opsysstring: a string in the encoding for filenames - * @len: the length of the string, or -1 if the string is - * NULL-terminated. - * @bytes_read: location to store the number of bytes in the - * input string that were successfully converted, or %NULL. - * Even if the conversion was succesful, this may be - * less than len if there were partial characters - * at the end of the input. If the error - * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - * stored will the byte fofset after the last valid - * input sequence. - * @bytes_written: the stored in the output buffer (not including the - * terminating nul. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError may occur. - * - * Converts a string which is in the encoding used for filenames - * into a UTF-8 string. - * - * Return value: The converted string, or %NULL on an error. - **/ -gchar* -g_filename_to_utf8 (const gchar *opsysstring, - gssize len, - gsize *bytes_read, - gsize *bytes_written, - GError **error) -{ -#ifdef G_PLATFORM_WIN32 - return g_locale_to_utf8 (opsysstring, len, - bytes_read, bytes_written, - error); -#else /* !G_PLATFORM_WIN32 */ - if (getenv ("G_BROKEN_FILENAMES")) - return g_locale_to_utf8 (opsysstring, len, - bytes_read, bytes_written, - error); - else - return strdup_len (opsysstring, len, bytes_read, bytes_written); -#endif /* !G_PLATFORM_WIN32 */ -} - -/** - * g_filename_from_utf8: - * @utf8string: a UTF-8 encoded string - * @len: the length of the string, or -1 if the string is - * NULL-terminated. - * @bytes_read: location to store the number of bytes in the - * input string that were successfully converted, or %NULL. - * Even if the conversion was succesful, this may be - * less than len if there were partial characters - * at the end of the input. If the error - * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - * stored will the byte fofset after the last valid - * input sequence. - * @bytes_written: the stored in the output buffer (not including the - * terminating nul. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError may occur. - * - * Converts a string from UTF-8 to the encoding used for filenames. - * - * Return value: The converted string, or %NULL on an error. - **/ -gchar* -g_filename_from_utf8 (const gchar *utf8string, - gssize len, - gsize *bytes_read, - gsize *bytes_written, - GError **error) -{ -#ifdef G_PLATFORM_WIN32 - return g_locale_from_utf8 (utf8string, len, - bytes_read, bytes_written, - error); -#else /* !G_PLATFORM_WIN32 */ - if (getenv ("G_BROKEN_FILENAMES")) - return g_locale_from_utf8 (utf8string, len, - bytes_read, bytes_written, - error); - else - return strdup_len (utf8string, len, bytes_read, bytes_written); -#endif /* !G_PLATFORM_WIN32 */ -} diff --git a/gconvert.h b/gconvert.h deleted file mode 100644 index 3166bfa0f..000000000 --- a/gconvert.h +++ /dev/null @@ -1,106 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_CONVERT_H__ -#define __G_CONVERT_H__ - -#include <stddef.h> /* For size_t */ -#include <gerror.h> - -G_BEGIN_DECLS - -typedef enum -{ - G_CONVERT_ERROR_NO_CONVERSION, - G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - G_CONVERT_ERROR_FAILED, - G_CONVERT_ERROR_PARTIAL_INPUT -} GConvertError; - -#define G_CONVERT_ERROR g_convert_error_quark() -GQuark g_convert_error_quark (void); - -/* Thin wrappers around iconv - */ -typedef struct _GIConv *GIConv; - -GIConv g_iconv_open (const gchar *to_codeset, - const gchar *from_codeset); -size_t g_iconv (GIConv converter, - gchar **inbuf, - gsize *inbytes_left, - gchar **outbuf, - gsize *outbytes_left); -gint g_iconv_close (GIConv converter); - - -gchar* g_convert (const gchar *str, - gssize len, - const gchar *to_codeset, - const gchar *from_codeset, - gsize *bytes_read, - gsize *bytes_written, - GError **error); -gchar* g_convert_with_fallback (const gchar *str, - gssize len, - const gchar *to_codeset, - const gchar *from_codeset, - gchar *fallback, - gsize *bytes_read, - gsize *bytes_written, - GError **error); - - -/* Convert between libc's idea of strings and UTF-8. - */ -gchar* g_locale_to_utf8 (const gchar *opsysstring, - gssize len, - gsize *bytes_read, - gsize *bytes_written, - GError **error); -gchar* g_locale_from_utf8 (const gchar *utf8string, - gssize len, - gsize *bytes_read, - gsize *bytes_written, - GError **error); - -/* Convert between the operating system (or C runtime) - * representation of file names and UTF-8. - */ -gchar* g_filename_to_utf8 (const gchar *opsysstring, - gssize len, - gsize *bytes_read, - gsize *bytes_written, - GError **error); -gchar* g_filename_from_utf8 (const gchar *utf8string, - gssize len, - gsize *bytes_read, - gsize *bytes_written, - GError **error); - -G_END_DECLS - -#endif /* __G_CONVERT_H__ */ diff --git a/gdataset.c b/gdataset.c deleted file mode 100644 index 7d8d9afd4..000000000 --- a/gdataset.c +++ /dev/null @@ -1,631 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * gdataset.c: Generic dataset mechanism, similar to GtkObject data. - * Copyright (C) 1998 Tim Janik - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe ; FIXME: might still freeze, watch out, not thoroughly - * looked at yet. - */ - -#include <string.h> -#include "glib.h" - - - -/* --- defines --- */ -#define G_QUARK_BLOCK_SIZE (512) -#define G_DATA_MEM_CHUNK_PREALLOC (128) -#define G_DATA_CACHE_MAX (512) -#define G_DATASET_MEM_CHUNK_PREALLOC (32) - - -/* --- structures --- */ -typedef struct _GDataset GDataset; -struct _GData -{ - GData *next; - GQuark id; - gpointer data; - GDestroyNotify destroy_func; -}; - -struct _GDataset -{ - gconstpointer location; - GData *datalist; -}; - - -/* --- prototypes --- */ -static inline GDataset* g_dataset_lookup (gconstpointer dataset_location); -static inline void g_datalist_clear_i (GData **datalist); -static void g_dataset_destroy_internal (GDataset *dataset); -static inline gpointer g_data_set_internal (GData **datalist, - GQuark key_id, - gpointer data, - GDestroyNotify destroy_func, - GDataset *dataset); -static void g_data_initialize (void); -static inline GQuark g_quark_new (gchar *string); - - -/* --- variables --- */ -G_LOCK_DEFINE_STATIC (g_dataset_global); -static GHashTable *g_dataset_location_ht = NULL; -static GDataset *g_dataset_cached = NULL; /* should this be - threadspecific? */ -static GMemChunk *g_dataset_mem_chunk = NULL; -static GMemChunk *g_data_mem_chunk = NULL; -static GData *g_data_cache = NULL; -static guint g_data_cache_length = 0; - -G_LOCK_DEFINE_STATIC (g_quark_global); -static GHashTable *g_quark_ht = NULL; -static gchar **g_quarks = NULL; -static GQuark g_quark_seq_id = 0; - - -/* --- functions --- */ - -/* HOLDS: g_dataset_global_lock */ -static inline void -g_datalist_clear_i (GData **datalist) -{ - register GData *list; - - /* unlink *all* items before walking their destructors - */ - list = *datalist; - *datalist = NULL; - - while (list) - { - register GData *prev; - - prev = list; - list = prev->next; - - if (prev->destroy_func) - { - G_UNLOCK (g_dataset_global); - prev->destroy_func (prev->data); - G_LOCK (g_dataset_global); - } - - if (g_data_cache_length < G_DATA_CACHE_MAX) - { - prev->next = g_data_cache; - g_data_cache = prev; - g_data_cache_length++; - } - else - g_mem_chunk_free (g_data_mem_chunk, prev); - } -} - -void -g_datalist_clear (GData **datalist) -{ - g_return_if_fail (datalist != NULL); - - G_LOCK (g_dataset_global); - if (!g_dataset_location_ht) - g_data_initialize (); - - while (*datalist) - g_datalist_clear_i (datalist); - G_UNLOCK (g_dataset_global); -} - -/* HOLDS: g_dataset_global_lock */ -static inline GDataset* -g_dataset_lookup (gconstpointer dataset_location) -{ - register GDataset *dataset; - - if (g_dataset_cached && g_dataset_cached->location == dataset_location) - return g_dataset_cached; - - dataset = g_hash_table_lookup (g_dataset_location_ht, dataset_location); - if (dataset) - g_dataset_cached = dataset; - - return dataset; -} - -/* HOLDS: g_dataset_global_lock */ -static void -g_dataset_destroy_internal (GDataset *dataset) -{ - register gconstpointer dataset_location; - - dataset_location = dataset->location; - while (dataset) - { - if (!dataset->datalist) - { - if (dataset == g_dataset_cached) - g_dataset_cached = NULL; - g_hash_table_remove (g_dataset_location_ht, dataset_location); - g_mem_chunk_free (g_dataset_mem_chunk, dataset); - break; - } - - g_datalist_clear_i (&dataset->datalist); - dataset = g_dataset_lookup (dataset_location); - } -} - -void -g_dataset_destroy (gconstpointer dataset_location) -{ - g_return_if_fail (dataset_location != NULL); - - G_LOCK (g_dataset_global); - if (g_dataset_location_ht) - { - register GDataset *dataset; - - dataset = g_dataset_lookup (dataset_location); - if (dataset) - g_dataset_destroy_internal (dataset); - } - G_UNLOCK (g_dataset_global); -} - -/* HOLDS: g_dataset_global_lock */ -static inline gpointer -g_data_set_internal (GData **datalist, - GQuark key_id, - gpointer data, - GDestroyNotify destroy_func, - GDataset *dataset) -{ - register GData *list; - - list = *datalist; - if (!data) - { - register GData *prev; - - prev = NULL; - while (list) - { - if (list->id == key_id) - { - gpointer ret_data = NULL; - - if (prev) - prev->next = list->next; - else - { - *datalist = list->next; - - /* the dataset destruction *must* be done - * prior to invokation of the data destroy function - */ - if (!*datalist && dataset) - g_dataset_destroy_internal (dataset); - } - - /* the GData struct *must* already be unlinked - * when invoking the destroy function. - * we use (data==NULL && destroy_func!=NULL) as - * a special hint combination to "steal" - * data without destroy notification - */ - if (list->destroy_func && !destroy_func) - { - G_UNLOCK (g_dataset_global); - list->destroy_func (list->data); - G_LOCK (g_dataset_global); - } - else - ret_data = list->data; - - if (g_data_cache_length < G_DATA_CACHE_MAX) - { - list->next = g_data_cache; - g_data_cache = list; - g_data_cache_length++; - } - else - g_mem_chunk_free (g_data_mem_chunk, list); - - return ret_data; - } - - prev = list; - list = list->next; - } - } - else - { - while (list) - { - if (list->id == key_id) - { - if (!list->destroy_func) - { - list->data = data; - list->destroy_func = destroy_func; - } - else - { - register GDestroyNotify dfunc; - register gpointer ddata; - - dfunc = list->destroy_func; - ddata = list->data; - list->data = data; - list->destroy_func = destroy_func; - - /* we need to have updated all structures prior to - * invokation of the destroy function - */ - G_UNLOCK (g_dataset_global); - dfunc (ddata); - G_LOCK (g_dataset_global); - } - - return NULL; - } - - list = list->next; - } - - if (g_data_cache) - { - list = g_data_cache; - g_data_cache = list->next; - g_data_cache_length--; - } - else - list = g_chunk_new (GData, g_data_mem_chunk); - list->next = *datalist; - list->id = key_id; - list->data = data; - list->destroy_func = destroy_func; - *datalist = list; - } - - return NULL; -} - -void -g_dataset_id_set_data_full (gconstpointer dataset_location, - GQuark key_id, - gpointer data, - GDestroyNotify destroy_func) -{ - register GDataset *dataset; - - g_return_if_fail (dataset_location != NULL); - if (!data) - g_return_if_fail (destroy_func == NULL); - if (!key_id) - { - if (data) - g_return_if_fail (key_id > 0); - else - return; - } - - G_LOCK (g_dataset_global); - if (!g_dataset_location_ht) - g_data_initialize (); - - dataset = g_dataset_lookup (dataset_location); - if (!dataset) - { - dataset = g_chunk_new (GDataset, g_dataset_mem_chunk); - dataset->location = dataset_location; - g_datalist_init (&dataset->datalist); - g_hash_table_insert (g_dataset_location_ht, - (gpointer) dataset->location, - dataset); - } - - g_data_set_internal (&dataset->datalist, key_id, data, destroy_func, dataset); - G_UNLOCK (g_dataset_global); -} - -void -g_datalist_id_set_data_full (GData **datalist, - GQuark key_id, - gpointer data, - GDestroyNotify destroy_func) -{ - g_return_if_fail (datalist != NULL); - if (!data) - g_return_if_fail (destroy_func == NULL); - if (!key_id) - { - if (data) - g_return_if_fail (key_id > 0); - else - return; - } - - G_LOCK (g_dataset_global); - if (!g_dataset_location_ht) - g_data_initialize (); - - g_data_set_internal (datalist, key_id, data, destroy_func, NULL); - G_UNLOCK (g_dataset_global); -} - -gpointer -g_dataset_id_remove_no_notify (gconstpointer dataset_location, - GQuark key_id) -{ - gpointer ret_data = NULL; - - g_return_val_if_fail (dataset_location != NULL, NULL); - - G_LOCK (g_dataset_global); - if (key_id && g_dataset_location_ht) - { - GDataset *dataset; - - dataset = g_dataset_lookup (dataset_location); - if (dataset) - ret_data = g_data_set_internal (&dataset->datalist, key_id, NULL, (GDestroyNotify) 42, dataset); - } - G_UNLOCK (g_dataset_global); - - return ret_data; -} - -gpointer -g_datalist_id_remove_no_notify (GData **datalist, - GQuark key_id) -{ - gpointer ret_data = NULL; - - g_return_val_if_fail (datalist != NULL, NULL); - - G_LOCK (g_dataset_global); - if (key_id && g_dataset_location_ht) - ret_data = g_data_set_internal (datalist, key_id, NULL, (GDestroyNotify) 42, NULL); - G_UNLOCK (g_dataset_global); - - return ret_data; -} - -gpointer -g_dataset_id_get_data (gconstpointer dataset_location, - GQuark key_id) -{ - g_return_val_if_fail (dataset_location != NULL, NULL); - - G_LOCK (g_dataset_global); - if (key_id && g_dataset_location_ht) - { - register GDataset *dataset; - - dataset = g_dataset_lookup (dataset_location); - if (dataset) - { - register GData *list; - - for (list = dataset->datalist; list; list = list->next) - if (list->id == key_id) - { - G_UNLOCK (g_dataset_global); - return list->data; - } - } - } - G_UNLOCK (g_dataset_global); - - return NULL; -} - -gpointer -g_datalist_id_get_data (GData **datalist, - GQuark key_id) -{ - g_return_val_if_fail (datalist != NULL, NULL); - - if (key_id) - { - register GData *list; - - for (list = *datalist; list; list = list->next) - if (list->id == key_id) - return list->data; - } - - return NULL; -} - -void -g_dataset_foreach (gconstpointer dataset_location, - GDataForeachFunc func, - gpointer user_data) -{ - register GDataset *dataset; - - g_return_if_fail (dataset_location != NULL); - g_return_if_fail (func != NULL); - - G_LOCK (g_dataset_global); - if (g_dataset_location_ht) - { - dataset = g_dataset_lookup (dataset_location); - G_UNLOCK (g_dataset_global); - if (dataset) - { - register GData *list, *next; - - for (list = dataset->datalist; list; list = next) - { - next = list->next; - func (list->id, list->data, user_data); - } - } - } - else - { - G_UNLOCK (g_dataset_global); - } -} - -void -g_datalist_foreach (GData **datalist, - GDataForeachFunc func, - gpointer user_data) -{ - register GData *list, *next; - - g_return_if_fail (datalist != NULL); - g_return_if_fail (func != NULL); - - for (list = *datalist; list; list = next) - { - next = list->next; - func (list->id, list->data, user_data); - } -} - -void -g_datalist_init (GData **datalist) -{ - g_return_if_fail (datalist != NULL); - - *datalist = NULL; -} - -/* HOLDS: g_dataset_global_lock */ -static void -g_data_initialize (void) -{ - g_return_if_fail (g_dataset_location_ht == NULL); - - g_dataset_location_ht = g_hash_table_new (g_direct_hash, NULL); - g_dataset_cached = NULL; - g_dataset_mem_chunk = - g_mem_chunk_new ("GDataset MemChunk", - sizeof (GDataset), - sizeof (GDataset) * G_DATASET_MEM_CHUNK_PREALLOC, - G_ALLOC_AND_FREE); - g_data_mem_chunk = - g_mem_chunk_new ("GData MemChunk", - sizeof (GData), - sizeof (GData) * G_DATA_MEM_CHUNK_PREALLOC, - G_ALLOC_AND_FREE); -} - -GQuark -g_quark_try_string (const gchar *string) -{ - GQuark quark = 0; - g_return_val_if_fail (string != NULL, 0); - - G_LOCK (g_quark_global); - if (g_quark_ht) - quark = GPOINTER_TO_UINT (g_hash_table_lookup (g_quark_ht, string)); - G_UNLOCK (g_quark_global); - - return quark; -} - -GQuark -g_quark_from_string (const gchar *string) -{ - GQuark quark; - - g_return_val_if_fail (string != NULL, 0); - - G_LOCK (g_quark_global); - if (g_quark_ht) - quark = (gulong) g_hash_table_lookup (g_quark_ht, string); - else - { - g_quark_ht = g_hash_table_new (g_str_hash, g_str_equal); - quark = 0; - } - - if (!quark) - quark = g_quark_new (g_strdup (string)); - G_UNLOCK (g_quark_global); - - return quark; -} - -GQuark -g_quark_from_static_string (const gchar *string) -{ - GQuark quark; - - g_return_val_if_fail (string != NULL, 0); - - G_LOCK (g_quark_global); - if (g_quark_ht) - quark = (gulong) g_hash_table_lookup (g_quark_ht, string); - else - { - g_quark_ht = g_hash_table_new (g_str_hash, g_str_equal); - quark = 0; - } - - if (!quark) - quark = g_quark_new ((gchar*) string); - G_UNLOCK (g_quark_global); - - return quark; -} - -G_CONST_RETURN gchar* -g_quark_to_string (GQuark quark) -{ - gchar* result = NULL; - G_LOCK (g_quark_global); - if (quark > 0 && quark <= g_quark_seq_id) - result = g_quarks[quark - 1]; - G_UNLOCK (g_quark_global); - - return result; -} - -/* HOLDS: g_quark_global_lock */ -static inline GQuark -g_quark_new (gchar *string) -{ - GQuark quark; - - if (g_quark_seq_id % G_QUARK_BLOCK_SIZE == 0) - g_quarks = g_renew (gchar*, g_quarks, g_quark_seq_id + G_QUARK_BLOCK_SIZE); - - g_quarks[g_quark_seq_id] = string; - g_quark_seq_id++; - quark = g_quark_seq_id; - g_hash_table_insert (g_quark_ht, string, GUINT_TO_POINTER (quark)); - - return quark; -} diff --git a/gdataset.h b/gdataset.h deleted file mode 100644 index f9d15b308..000000000 --- a/gdataset.h +++ /dev/null @@ -1,106 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_DATASET_H__ -#define __G_DATASET_H__ - -#include <gquark.h> - -G_BEGIN_DECLS - -typedef struct _GData GData; - -typedef void (*GDataForeachFunc) (GQuark key_id, - gpointer data, - gpointer user_data); - -/* Keyed Data List - */ -void g_datalist_init (GData **datalist); -void g_datalist_clear (GData **datalist); -gpointer g_datalist_id_get_data (GData **datalist, - GQuark key_id); -void g_datalist_id_set_data_full (GData **datalist, - GQuark key_id, - gpointer data, - GDestroyNotify destroy_func); -gpointer g_datalist_id_remove_no_notify (GData **datalist, - GQuark key_id); -void g_datalist_foreach (GData **datalist, - GDataForeachFunc func, - gpointer user_data); -#define g_datalist_id_set_data(dl, q, d) \ - g_datalist_id_set_data_full ((dl), (q), (d), NULL) -#define g_datalist_id_remove_data(dl, q) \ - g_datalist_id_set_data ((dl), (q), NULL) -#define g_datalist_get_data(dl, k) \ - (g_datalist_id_get_data ((dl), g_quark_try_string (k))) -#define g_datalist_set_data_full(dl, k, d, f) \ - g_datalist_id_set_data_full ((dl), g_quark_from_string (k), (d), (f)) -#define g_datalist_remove_no_notify(dl, k) \ - g_datalist_id_remove_no_notify ((dl), g_quark_try_string (k)) -#define g_datalist_set_data(dl, k, d) \ - g_datalist_set_data_full ((dl), (k), (d), NULL) -#define g_datalist_remove_data(dl, k) \ - g_datalist_id_set_data ((dl), g_quark_try_string (k), NULL) - - -/* Location Associated Keyed Data - */ -void g_dataset_destroy (gconstpointer dataset_location); -gpointer g_dataset_id_get_data (gconstpointer dataset_location, - GQuark key_id); -void g_dataset_id_set_data_full (gconstpointer dataset_location, - GQuark key_id, - gpointer data, - GDestroyNotify destroy_func); -gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, - GQuark key_id); -void g_dataset_foreach (gconstpointer dataset_location, - GDataForeachFunc func, - gpointer user_data); -#define g_dataset_id_set_data(l, k, d) \ - g_dataset_id_set_data_full ((l), (k), (d), NULL) -#define g_dataset_id_remove_data(l, k) \ - g_dataset_id_set_data ((l), (k), NULL) -#define g_dataset_get_data(l, k) \ - (g_dataset_id_get_data ((l), g_quark_try_string (k))) -#define g_dataset_set_data_full(l, k, d, f) \ - g_dataset_id_set_data_full ((l), g_quark_from_string (k), (d), (f)) -#define g_dataset_remove_no_notify(l, k) \ - g_dataset_id_remove_no_notify ((l), g_quark_try_string (k)) -#define g_dataset_set_data(l, k, d) \ - g_dataset_set_data_full ((l), (k), (d), NULL) -#define g_dataset_remove_data(l, k) \ - g_dataset_id_set_data ((l), g_quark_try_string (k), NULL) - -G_END_DECLS - -#endif /* __G_DATASET_H__ */ - - - - diff --git a/gdate.c b/gdate.c deleted file mode 100644 index 607e42a30..000000000 --- a/gdate.c +++ /dev/null @@ -1,1353 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#define DEBUG_MSG(x) /* */ -#ifdef G_ENABLE_DEBUG -/* #define DEBUG_MSG(args) g_message args ; */ -#endif - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glib.h" - -#include <time.h> -#include <string.h> -#include <ctype.h> -#include <stdlib.h> -#include <locale.h> - -GDate* -g_date_new () -{ - GDate *d = g_new0 (GDate, 1); /* happily, 0 is the invalid flag for everything. */ - - return d; -} - -GDate* -g_date_new_dmy (GDateDay day, GDateMonth m, GDateYear y) -{ - GDate *d; - g_return_val_if_fail (g_date_valid_dmy (day, m, y), NULL); - - d = g_new (GDate, 1); - - d->julian = FALSE; - d->dmy = TRUE; - - d->month = m; - d->day = day; - d->year = y; - - g_assert (g_date_valid (d)); - - return d; -} - -GDate* -g_date_new_julian (guint32 j) -{ - GDate *d; - g_return_val_if_fail (g_date_valid_julian (j), NULL); - - d = g_new (GDate, 1); - - d->julian = TRUE; - d->dmy = FALSE; - - d->julian_days = j; - - g_assert (g_date_valid (d)); - - return d; -} - -void -g_date_free (GDate *d) -{ - g_return_if_fail (d != NULL); - - g_free (d); -} - -gboolean -g_date_valid (const GDate *d) -{ - g_return_val_if_fail (d != NULL, FALSE); - - return (d->julian || d->dmy); -} - -static const guint8 days_in_months[2][13] = -{ /* error, jan feb mar apr may jun jul aug sep oct nov dec */ - { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } /* leap year */ -}; - -static const guint16 days_in_year[2][14] = -{ /* 0, jan feb mar apr may jun jul aug sep oct nov dec */ - { 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, - { 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } -}; - -gboolean -g_date_valid_month (GDateMonth m) -{ - return ( (m > G_DATE_BAD_MONTH) && (m < 13) ); -} - -gboolean -g_date_valid_year (GDateYear y) -{ - return ( y > G_DATE_BAD_YEAR ); -} - -gboolean -g_date_valid_day (GDateDay d) -{ - return ( (d > G_DATE_BAD_DAY) && (d < 32) ); -} - -gboolean -g_date_valid_weekday (GDateWeekday w) -{ - return ( (w > G_DATE_BAD_WEEKDAY) && (w < 8) ); -} - -gboolean -g_date_valid_julian (guint32 j) -{ - return (j > G_DATE_BAD_JULIAN); -} - -gboolean -g_date_valid_dmy (GDateDay d, - GDateMonth m, - GDateYear y) -{ - return ( (m > G_DATE_BAD_MONTH) && - (m < 13) && - (d > G_DATE_BAD_DAY) && - (y > G_DATE_BAD_YEAR) && /* must check before using g_date_is_leap_year */ - (d <= (g_date_is_leap_year (y) ? - days_in_months[1][m] : days_in_months[0][m])) ); -} - - -/* "Julian days" just means an absolute number of days, where Day 1 == - * Jan 1, Year 1 - */ -static void -g_date_update_julian (const GDate *const_d) -{ - GDate *d = (GDate *) const_d; - GDateYear year; - gint index; - - g_return_if_fail (d != NULL); - g_return_if_fail (d->dmy); - g_return_if_fail (!d->julian); - g_return_if_fail (g_date_valid_dmy (d->day, d->month, d->year)); - - /* What we actually do is: multiply years * 365 days in the year, - * add the number of years divided by 4, subtract the number of - * years divided by 100 and add the number of years divided by 400, - * which accounts for leap year stuff. Code from Steffen Beyer's - * DateCalc. - */ - - year = d->year - 1; /* we know d->year > 0 since it's valid */ - - d->julian_days = year * 365U; - d->julian_days += (year >>= 2); /* divide by 4 and add */ - d->julian_days -= (year /= 25); /* divides original # years by 100 */ - d->julian_days += year >> 2; /* divides by 4, which divides original by 400 */ - - index = g_date_is_leap_year (d->year) ? 1 : 0; - - d->julian_days += days_in_year[index][d->month] + d->day; - - g_return_if_fail (g_date_valid_julian (d->julian_days)); - - d->julian = TRUE; -} - -static void -g_date_update_dmy (const GDate *const_d) -{ - GDate *d = (GDate *) const_d; - GDateYear y; - GDateMonth m; - GDateDay day; - - guint32 A, B, C, D, E, M; - - g_return_if_fail (d != NULL); - g_return_if_fail (d->julian); - g_return_if_fail (!d->dmy); - g_return_if_fail (g_date_valid_julian (d->julian_days)); - - /* Formula taken from the Calendar FAQ; the formula was for the - * Julian Period which starts on 1 January 4713 BC, so we add - * 1,721,425 to the number of days before doing the formula. - * - * I'm sure this can be simplified for our 1 January 1 AD period - * start, but I can't figure out how to unpack the formula. - */ - - A = d->julian_days + 1721425 + 32045; - B = ( 4 *(A + 36524) )/ 146097 - 1; - C = A - (146097 * B)/4; - D = ( 4 * (C + 365) ) / 1461 - 1; - E = C - ((1461*D) / 4); - M = (5 * (E - 1) + 2)/153; - - m = M + 3 - (12*(M/10)); - day = E - (153*M + 2)/5; - y = 100 * B + D - 4800 + (M/10); - -#ifdef G_ENABLE_DEBUG - if (!g_date_valid_dmy (day, m, y)) - { - g_warning ("\nOOPS julian: %u computed dmy: %u %u %u\n", - d->julian_days, day, m, y); - } -#endif - - d->month = m; - d->day = day; - d->year = y; - - d->dmy = TRUE; -} - -GDateWeekday -g_date_get_weekday (const GDate *d) -{ - g_return_val_if_fail (d != NULL, G_DATE_BAD_WEEKDAY); - g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_WEEKDAY); - - if (!d->julian) - { - g_date_update_julian (d); - } - g_return_val_if_fail (d->julian, G_DATE_BAD_WEEKDAY); - - return ((d->julian_days - 1) % 7) + 1; -} - -GDateMonth -g_date_get_month (const GDate *d) -{ - g_return_val_if_fail (d != NULL, G_DATE_BAD_MONTH); - g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_MONTH); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_val_if_fail (d->dmy, G_DATE_BAD_MONTH); - - return d->month; -} - -GDateYear -g_date_get_year (const GDate *d) -{ - g_return_val_if_fail (d != NULL, G_DATE_BAD_YEAR); - g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_YEAR); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_val_if_fail (d->dmy, G_DATE_BAD_YEAR); - - return d->year; -} - -GDateDay -g_date_get_day (const GDate *d) -{ - g_return_val_if_fail (d != NULL, G_DATE_BAD_DAY); - g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_DAY); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_val_if_fail (d->dmy, G_DATE_BAD_DAY); - - return d->day; -} - -guint32 -g_date_get_julian (const GDate *d) -{ - g_return_val_if_fail (d != NULL, G_DATE_BAD_JULIAN); - g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_JULIAN); - - if (!d->julian) - { - g_date_update_julian (d); - } - g_return_val_if_fail (d->julian, G_DATE_BAD_JULIAN); - - return d->julian_days; -} - -guint -g_date_get_day_of_year (const GDate *d) -{ - gint index; - - g_return_val_if_fail (d != NULL, 0); - g_return_val_if_fail (g_date_valid (d), 0); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_val_if_fail (d->dmy, 0); - - index = g_date_is_leap_year (d->year) ? 1 : 0; - - return (days_in_year[index][d->month] + d->day); -} - -guint -g_date_get_monday_week_of_year (const GDate *d) -{ - GDateWeekday wd; - guint day; - GDate first; - - g_return_val_if_fail (d != NULL, 0); - g_return_val_if_fail (g_date_valid (d), 0); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_val_if_fail (d->dmy, 0); - - g_date_clear (&first, 1); - - g_date_set_dmy (&first, 1, 1, d->year); - - wd = g_date_get_weekday (&first) - 1; /* make Monday day 0 */ - day = g_date_get_day_of_year (d) - 1; - - return ((day + wd)/7U + (wd == 0 ? 1 : 0)); -} - -guint -g_date_get_sunday_week_of_year (const GDate *d) -{ - GDateWeekday wd; - guint day; - GDate first; - - g_return_val_if_fail (d != NULL, 0); - g_return_val_if_fail (g_date_valid (d), 0); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_val_if_fail (d->dmy, 0); - - g_date_clear (&first, 1); - - g_date_set_dmy (&first, 1, 1, d->year); - - wd = g_date_get_weekday (&first); - if (wd == 7) wd = 0; /* make Sunday day 0 */ - day = g_date_get_day_of_year (d) - 1; - - return ((day + wd)/7U + (wd == 0 ? 1 : 0)); -} - -gint -g_date_days_between (const GDate *d1, - const GDate *d2) -{ - g_return_val_if_fail (d1 != NULL, 0); - g_return_val_if_fail (d2 != NULL, 0); - - g_return_val_if_fail (g_date_valid (d1), 0); - g_return_val_if_fail (g_date_valid (d2), 0); - - return (gint)g_date_get_julian (d2) - (gint)g_date_get_julian (d1); -} - -void -g_date_clear (GDate *d, guint ndates) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (ndates != 0); - - memset (d, 0x0, ndates*sizeof (GDate)); -} - -G_LOCK_DEFINE_STATIC (g_date_global); - -/* These are for the parser, output to the user should use * - * g_date_strftime () - this creates more never-freed memory to annoy - * all those memory debugger users. :-) - */ - -static gchar *long_month_names[13] = -{ - "Error", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL -}; - -static gchar *short_month_names[13] = -{ - "Error", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL -}; - -/* This tells us if we need to update the parse info */ -static gchar *current_locale = NULL; - -/* order of these in the current locale */ -static GDateDMY dmy_order[3] = -{ - G_DATE_DAY, G_DATE_MONTH, G_DATE_YEAR -}; - -/* Where to chop two-digit years: i.e., for the 1930 default, numbers - * 29 and below are counted as in the year 2000, numbers 30 and above - * are counted as in the year 1900. - */ - -static GDateYear twodigit_start_year = 1930; - -/* It is impossible to enter a year between 1 AD and 99 AD with this - * in effect. - */ -static gboolean using_twodigit_years = FALSE; - -struct _GDateParseTokens { - gint num_ints; - gint n[3]; - guint month; -}; - -typedef struct _GDateParseTokens GDateParseTokens; - -#define NUM_LEN 10 - -/* HOLDS: g_date_global_lock */ -static void -g_date_fill_parse_tokens (const gchar *str, GDateParseTokens *pt) -{ - gchar num[4][NUM_LEN+1]; - gint i; - const guchar *s; - - /* We count 4, but store 3; so we can give an error - * if there are 4. - */ - num[0][0] = num[1][0] = num[2][0] = num[3][0] = '\0'; - - s = (const guchar *) str; - pt->num_ints = 0; - while (*s && pt->num_ints < 4) - { - - i = 0; - while (*s && isdigit (*s) && i <= NUM_LEN) - { - num[pt->num_ints][i] = *s; - ++s; - ++i; - } - - if (i > 0) - { - num[pt->num_ints][i] = '\0'; - ++(pt->num_ints); - } - - if (*s == '\0') break; - - ++s; - } - - pt->n[0] = pt->num_ints > 0 ? atoi (num[0]) : 0; - pt->n[1] = pt->num_ints > 1 ? atoi (num[1]) : 0; - pt->n[2] = pt->num_ints > 2 ? atoi (num[2]) : 0; - - pt->month = G_DATE_BAD_MONTH; - - if (pt->num_ints < 3) - { - gchar lcstr[128]; - - strncpy (lcstr, str, 127); - g_strdown (lcstr); - - while (i < 13) - { - if (long_month_names[i] != NULL) - { - const gchar *found = strstr (lcstr, long_month_names[i]); - - if (found != NULL) - { - pt->month = i; - return; - } - } - - if (short_month_names[i] != NULL) - { - const gchar *found = strstr (lcstr, short_month_names[i]); - - if (found != NULL) - { - pt->month = i; - return; - } - } - - ++i; - } - } -} - -/* HOLDS: g_date_global_lock */ -static void -g_date_prepare_to_parse (const gchar *str, GDateParseTokens *pt) -{ - const gchar *locale = setlocale (LC_TIME, NULL); - gboolean recompute_localeinfo = FALSE; - GDate d; - - g_return_if_fail (locale != NULL); /* should not happen */ - - g_date_clear (&d, 1); /* clear for scratch use */ - - if ( (current_locale == NULL) || (strcmp (locale, current_locale) != 0) ) - { - recompute_localeinfo = TRUE; /* Uh, there used to be a reason for the temporary */ - } - - if (recompute_localeinfo) - { - int i = 1; - GDateParseTokens testpt; - gchar buf[128]; - - g_free (current_locale); /* still works if current_locale == NULL */ - - current_locale = g_strdup (locale); - - while (i < 13) - { - g_date_set_dmy (&d, 1, i, 1); - - g_return_if_fail (g_date_valid (&d)); - - g_date_strftime (buf, 127, "%b", &d); - g_free (short_month_names[i]); - g_strdown (buf); - short_month_names[i] = g_strdup (buf); - - - - g_date_strftime (buf, 127, "%B", &d); - g_free (long_month_names[i]); - g_strdown (buf); - long_month_names[i] = g_strdup (buf); - - ++i; - } - - /* Determine DMY order */ - - /* had to pick a random day - don't change this, some strftimes - * are broken on some days, and this one is good so far. */ - g_date_set_dmy (&d, 4, 7, 1976); - - g_date_strftime (buf, 127, "%x", &d); - - g_date_fill_parse_tokens (buf, &testpt); - - i = 0; - while (i < testpt.num_ints) - { - switch (testpt.n[i]) - { - case 7: - dmy_order[i] = G_DATE_MONTH; - break; - case 4: - dmy_order[i] = G_DATE_DAY; - break; - case 76: - using_twodigit_years = TRUE; /* FALL THRU */ - case 1976: - dmy_order[i] = G_DATE_YEAR; - break; - default: - /* leave it unchanged */ - break; - } - ++i; - } - -#ifdef G_ENABLE_DEBUG - DEBUG_MSG (("**GDate prepared a new set of locale-specific parse rules.")); - i = 1; - while (i < 13) - { - DEBUG_MSG ((" %s %s", long_month_names[i], short_month_names[i])); - ++i; - } - if (using_twodigit_years) - DEBUG_MSG (("**Using twodigit years with cutoff year: %u", twodigit_start_year)); - { - gchar *strings[3]; - i = 0; - while (i < 3) - { - switch (dmy_order[i]) - { - case G_DATE_MONTH: - strings[i] = "Month"; - break; - case G_DATE_YEAR: - strings[i] = "Year"; - break; - case G_DATE_DAY: - strings[i] = "Day"; - break; - default: - strings[i] = NULL; - break; - } - ++i; - } - DEBUG_MSG (("**Order: %s, %s, %s", strings[0], strings[1], strings[2])); - DEBUG_MSG (("**Sample date in this locale: `%s'", buf)); - } -#endif - } - - g_date_fill_parse_tokens (str, pt); -} - -void -g_date_set_parse (GDate *d, - const gchar *str) -{ - GDateParseTokens pt; - guint m = G_DATE_BAD_MONTH, day = G_DATE_BAD_DAY, y = G_DATE_BAD_YEAR; - - g_return_if_fail (d != NULL); - - /* set invalid */ - g_date_clear (d, 1); - - G_LOCK (g_date_global); - - g_date_prepare_to_parse (str, &pt); - - DEBUG_MSG (("Found %d ints, `%d' `%d' `%d' and written out month %d", - pt.num_ints, pt.n[0], pt.n[1], pt.n[2], pt.month)); - - - if (pt.num_ints == 4) - { - G_UNLOCK (g_date_global); - return; /* presumably a typo; bail out. */ - } - - if (pt.num_ints > 1) - { - int i = 0; - int j = 0; - - g_assert (pt.num_ints < 4); /* i.e., it is 2 or 3 */ - - while (i < pt.num_ints && j < 3) - { - switch (dmy_order[j]) - { - case G_DATE_MONTH: - { - if (pt.num_ints == 2 && pt.month != G_DATE_BAD_MONTH) - { - m = pt.month; - ++j; /* skip months, but don't skip this number */ - continue; - } - else - m = pt.n[i]; - } - break; - case G_DATE_DAY: - { - if (pt.num_ints == 2 && pt.month == G_DATE_BAD_MONTH) - { - day = 1; - ++j; /* skip days, since we may have month/year */ - continue; - } - day = pt.n[i]; - } - break; - case G_DATE_YEAR: - { - y = pt.n[i]; - - if (using_twodigit_years && y < 100) - { - guint two = twodigit_start_year % 100; - guint century = (twodigit_start_year / 100) * 100; - - if (y < two) - century += 100; - - y += century; - } - } - break; - default: - break; - } - - ++i; - ++j; - } - - - if (pt.num_ints == 3 && !g_date_valid_dmy (day, m, y)) - { - /* Try YYYY MM DD */ - y = pt.n[0]; - m = pt.n[1]; - day = pt.n[2]; - - if (using_twodigit_years && y < 100) - y = G_DATE_BAD_YEAR; /* avoids ambiguity */ - } - else if (pt.num_ints == 2) - { - if (m == G_DATE_BAD_MONTH && pt.month != G_DATE_BAD_MONTH) - { - m = pt.month; - } - } - } - else if (pt.num_ints == 1) - { - if (pt.month != G_DATE_BAD_MONTH) - { - /* Month name and year? */ - m = pt.month; - day = 1; - y = pt.n[0]; - } - else - { - /* Try yyyymmdd and yymmdd */ - - m = (pt.n[0]/100) % 100; - day = pt.n[0] % 100; - y = pt.n[0]/10000; - - /* FIXME move this into a separate function */ - if (using_twodigit_years && y < 100) - { - guint two = twodigit_start_year % 100; - guint century = (twodigit_start_year / 100) * 100; - - if (y < two) - century += 100; - - y += century; - } - } - } - - /* See if we got anything valid out of all this. */ - /* y < 8000 is to catch 19998 style typos; the library is OK up to 65535 or so */ - if (y < 8000 && g_date_valid_dmy (day, m, y)) - { - d->month = m; - d->day = day; - d->year = y; - d->dmy = TRUE; - } -#ifdef G_ENABLE_DEBUG - else - DEBUG_MSG (("Rejected DMY %u %u %u", day, m, y)); -#endif - G_UNLOCK (g_date_global); -} - -void -g_date_set_time (GDate *d, - GTime time) -{ - time_t t = time; - struct tm tm; - - g_return_if_fail (d != NULL); - -#ifdef HAVE_LOCALTIME_R - localtime_r (&t, &tm); -#else - { - struct tm *ptm = localtime (&t); - g_assert (ptm); - memcpy ((void *) &tm, (void *) ptm, sizeof(struct tm)); - } -#endif - - d->julian = FALSE; - - d->month = tm.tm_mon + 1; - d->day = tm.tm_mday; - d->year = tm.tm_year + 1900; - - g_return_if_fail (g_date_valid_dmy (d->day, d->month, d->year)); - - d->dmy = TRUE; -} - -void -g_date_set_month (GDate *d, - GDateMonth m) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid_month (m)); - - if (d->julian && !d->dmy) g_date_update_dmy(d); - d->julian = FALSE; - - d->month = m; - - if (g_date_valid_dmy (d->day, d->month, d->year)) - d->dmy = TRUE; - else - d->dmy = FALSE; -} - -void -g_date_set_day (GDate *d, - GDateDay day) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid_day (day)); - - if (d->julian && !d->dmy) g_date_update_dmy(d); - d->julian = FALSE; - - d->day = day; - - if (g_date_valid_dmy (d->day, d->month, d->year)) - d->dmy = TRUE; - else - d->dmy = FALSE; -} - -void -g_date_set_year (GDate *d, - GDateYear y) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid_year (y)); - - if (d->julian && !d->dmy) g_date_update_dmy(d); - d->julian = FALSE; - - d->year = y; - - if (g_date_valid_dmy (d->day, d->month, d->year)) - d->dmy = TRUE; - else - d->dmy = FALSE; -} - -void -g_date_set_dmy (GDate *d, - GDateDay day, - GDateMonth m, - GDateYear y) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid_dmy (day, m, y)); - - d->julian = FALSE; - - d->month = m; - d->day = day; - d->year = y; - - d->dmy = TRUE; -} - -void -g_date_set_julian (GDate *d, guint32 j) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid_julian (j)); - - d->julian_days = j; - d->julian = TRUE; - d->dmy = FALSE; -} - - -gboolean -g_date_is_first_of_month (const GDate *d) -{ - g_return_val_if_fail (d != NULL, FALSE); - g_return_val_if_fail (g_date_valid (d), FALSE); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_val_if_fail (d->dmy, FALSE); - - if (d->day == 1) return TRUE; - else return FALSE; -} - -gboolean -g_date_is_last_of_month (const GDate *d) -{ - gint index; - - g_return_val_if_fail (d != NULL, FALSE); - g_return_val_if_fail (g_date_valid (d), FALSE); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_val_if_fail (d->dmy, FALSE); - - index = g_date_is_leap_year (d->year) ? 1 : 0; - - if (d->day == days_in_months[index][d->month]) return TRUE; - else return FALSE; -} - -void -g_date_add_days (GDate *d, guint ndays) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid (d)); - - if (!d->julian) - { - g_date_update_julian (d); - } - g_return_if_fail (d->julian); - - d->julian_days += ndays; - d->dmy = FALSE; -} - -void -g_date_subtract_days (GDate *d, guint ndays) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid (d)); - - if (!d->julian) - { - g_date_update_julian (d); - } - g_return_if_fail (d->julian); - g_return_if_fail (d->julian_days > ndays); - - d->julian_days -= ndays; - d->dmy = FALSE; -} - -void -g_date_add_months (GDate *d, - guint nmonths) -{ - guint years, months; - gint index; - - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid (d)); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_if_fail (d->dmy); - - nmonths += d->month - 1; - - years = nmonths/12; - months = nmonths%12; - - d->month = months + 1; - d->year += years; - - index = g_date_is_leap_year (d->year) ? 1 : 0; - - if (d->day > days_in_months[index][d->month]) - d->day = days_in_months[index][d->month]; - - d->julian = FALSE; - - g_return_if_fail (g_date_valid (d)); -} - -void -g_date_subtract_months (GDate *d, - guint nmonths) -{ - guint years, months; - gint index; - - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid (d)); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_if_fail (d->dmy); - - years = nmonths/12; - months = nmonths%12; - - g_return_if_fail (d->year > years); - - d->year -= years; - - if (d->month > months) d->month -= months; - else - { - months -= d->month; - d->month = 12 - months; - d->year -= 1; - } - - index = g_date_is_leap_year (d->year) ? 1 : 0; - - if (d->day > days_in_months[index][d->month]) - d->day = days_in_months[index][d->month]; - - d->julian = FALSE; - - g_return_if_fail (g_date_valid (d)); -} - -void -g_date_add_years (GDate *d, - guint nyears) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid (d)); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_if_fail (d->dmy); - - d->year += nyears; - - if (d->month == 2 && d->day == 29) - { - if (!g_date_is_leap_year (d->year)) - { - d->day = 28; - } - } - - d->julian = FALSE; -} - -void -g_date_subtract_years (GDate *d, - guint nyears) -{ - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid (d)); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_if_fail (d->dmy); - g_return_if_fail (d->year > nyears); - - d->year -= nyears; - - if (d->month == 2 && d->day == 29) - { - if (!g_date_is_leap_year (d->year)) - { - d->day = 28; - } - } - - d->julian = FALSE; -} - - -gboolean -g_date_is_leap_year (GDateYear year) -{ - g_return_val_if_fail (g_date_valid_year (year), FALSE); - - return ( (((year % 4) == 0) && ((year % 100) != 0)) || - (year % 400) == 0 ); -} - -guint8 -g_date_get_days_in_month (GDateMonth month, - GDateYear year) -{ - gint index; - - g_return_val_if_fail (g_date_valid_year (year), 0); - g_return_val_if_fail (g_date_valid_month (month), 0); - - index = g_date_is_leap_year (year) ? 1 : 0; - - return days_in_months[index][month]; -} - -guint8 -g_date_get_monday_weeks_in_year (GDateYear year) -{ - GDate d; - - g_return_val_if_fail (g_date_valid_year (year), 0); - - g_date_clear (&d, 1); - g_date_set_dmy (&d, 1, 1, year); - if (g_date_get_weekday (&d) == G_DATE_MONDAY) return 53; - g_date_set_dmy (&d, 31, 12, year); - if (g_date_get_weekday (&d) == G_DATE_MONDAY) return 53; - if (g_date_is_leap_year (year)) - { - g_date_set_dmy (&d, 2, 1, year); - if (g_date_get_weekday (&d) == G_DATE_MONDAY) return 53; - g_date_set_dmy (&d, 30, 12, year); - if (g_date_get_weekday (&d) == G_DATE_MONDAY) return 53; - } - return 52; -} - -guint8 -g_date_get_sunday_weeks_in_year (GDateYear year) -{ - GDate d; - - g_return_val_if_fail (g_date_valid_year (year), 0); - - g_date_clear (&d, 1); - g_date_set_dmy (&d, 1, 1, year); - if (g_date_get_weekday (&d) == G_DATE_SUNDAY) return 53; - g_date_set_dmy (&d, 31, 12, year); - if (g_date_get_weekday (&d) == G_DATE_SUNDAY) return 53; - if (g_date_is_leap_year (year)) - { - g_date_set_dmy (&d, 2, 1, year); - if (g_date_get_weekday (&d) == G_DATE_SUNDAY) return 53; - g_date_set_dmy (&d, 30, 12, year); - if (g_date_get_weekday (&d) == G_DATE_SUNDAY) return 53; - } - return 52; -} - -gint -g_date_compare (const GDate *lhs, - const GDate *rhs) -{ - g_return_val_if_fail (lhs != NULL, 0); - g_return_val_if_fail (rhs != NULL, 0); - g_return_val_if_fail (g_date_valid (lhs), 0); - g_return_val_if_fail (g_date_valid (rhs), 0); - - /* Remember the self-comparison case! I think it works right now. */ - - while (TRUE) - { - - if (lhs->julian && rhs->julian) - { - if (lhs->julian_days < rhs->julian_days) return -1; - else if (lhs->julian_days > rhs->julian_days) return 1; - else return 0; - } - else if (lhs->dmy && rhs->dmy) - { - if (lhs->year < rhs->year) return -1; - else if (lhs->year > rhs->year) return 1; - else - { - if (lhs->month < rhs->month) return -1; - else if (lhs->month > rhs->month) return 1; - else - { - if (lhs->day < rhs->day) return -1; - else if (lhs->day > rhs->day) return 1; - else return 0; - } - - } - - } - else - { - if (!lhs->julian) g_date_update_julian (lhs); - if (!rhs->julian) g_date_update_julian (rhs); - g_return_val_if_fail (lhs->julian, 0); - g_return_val_if_fail (rhs->julian, 0); - } - - } - return 0; /* warnings */ -} - - -void -g_date_to_struct_tm (const GDate *d, - struct tm *tm) -{ - GDateWeekday day; - - g_return_if_fail (d != NULL); - g_return_if_fail (g_date_valid (d)); - g_return_if_fail (tm != NULL); - - if (!d->dmy) - { - g_date_update_dmy (d); - } - g_return_if_fail (d->dmy); - - /* zero all the irrelevant fields to be sure they're valid */ - - /* On Linux and maybe other systems, there are weird non-POSIX - * fields on the end of struct tm that choke strftime if they - * contain garbage. So we need to 0 the entire struct, not just the - * fields we know to exist. - */ - - memset (tm, 0x0, sizeof (struct tm)); - - tm->tm_mday = d->day; - tm->tm_mon = d->month - 1; /* 0-11 goes in tm */ - tm->tm_year = ((int)d->year) - 1900; /* X/Open says tm_year can be negative */ - - day = g_date_get_weekday (d); - if (day == 7) day = 0; /* struct tm wants days since Sunday, so Sunday is 0 */ - - tm->tm_wday = (int)day; - - tm->tm_yday = g_date_get_day_of_year (d) - 1; /* 0 to 365 */ - tm->tm_isdst = -1; /* -1 means "information not available" */ -} - -void -g_date_clamp (GDate *date, - const GDate *min_date, - const GDate *max_date) -{ - g_return_if_fail (date); - g_return_if_fail (g_date_valid (date)); - if (min_date != NULL) - g_return_if_fail (g_date_valid (min_date)); - if (max_date != NULL) - g_return_if_fail (g_date_valid (max_date)); - if (min_date != NULL && max_date != NULL) - g_return_if_fail (g_date_compare (min_date, max_date) <= 0); - - if (min_date && g_date_compare (date, min_date) < 0) - *date = *min_date; - - if (max_date && g_date_compare (max_date, date) < 0) - *date = *max_date; -} - -void -g_date_order (GDate *date1, - GDate *date2) -{ - g_return_if_fail (date1 != NULL); - g_return_if_fail (date2 != NULL); - g_return_if_fail (g_date_valid (date1)); - g_return_if_fail (g_date_valid (date2)); - - if (g_date_compare (date1, date2) == 1) { - GDate tmp = *date1; - *date1 = *date2; - *date2 = tmp; - } -} - -gsize -g_date_strftime (gchar *s, - gsize slen, - const gchar *format, - const GDate *d) -{ - struct tm tm; - gsize retval; - - g_return_val_if_fail (d != NULL, 0); - g_return_val_if_fail (g_date_valid (d), 0); - g_return_val_if_fail (slen > 0, 0); - g_return_val_if_fail (format != 0, 0); - g_return_val_if_fail (s != 0, 0); - - g_date_to_struct_tm (d, &tm); - - retval = strftime (s, slen, format, &tm); - if (retval == 0) - { - /* If retval == 0, the contents of s are undefined. We define - * them. - */ - s[0] = '\0'; - } - return retval; -} diff --git a/gdate.h b/gdate.h deleted file mode 100644 index 4cbdd8c0d..000000000 --- a/gdate.h +++ /dev/null @@ -1,252 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_DATE_H__ -#define __G_DATE_H__ - -#include <gquark.h> - -G_BEGIN_DECLS - -/* GDate - * - * Date calculations (not time for now, to be resolved). These are a - * mutant combination of Steffen Beyer's DateCalc routines - * (http://www.perl.com/CPAN/authors/id/STBEY/) and Jon Trowbridge's - * date routines (written for in-house software). Written by Havoc - * Pennington <hp@pobox.com> - */ - -typedef gint32 GTime; -typedef guint16 GDateYear; -typedef guint8 GDateDay; /* day of the month */ -typedef struct _GDate GDate; -/* make struct tm known without having to include time.h */ -struct tm; - -/* enum used to specify order of appearance in parsed date strings */ -typedef enum -{ - G_DATE_DAY = 0, - G_DATE_MONTH = 1, - G_DATE_YEAR = 2 -} GDateDMY; - -/* actual week and month values */ -typedef enum -{ - G_DATE_BAD_WEEKDAY = 0, - G_DATE_MONDAY = 1, - G_DATE_TUESDAY = 2, - G_DATE_WEDNESDAY = 3, - G_DATE_THURSDAY = 4, - G_DATE_FRIDAY = 5, - G_DATE_SATURDAY = 6, - G_DATE_SUNDAY = 7 -} GDateWeekday; -typedef enum -{ - G_DATE_BAD_MONTH = 0, - G_DATE_JANUARY = 1, - G_DATE_FEBRUARY = 2, - G_DATE_MARCH = 3, - G_DATE_APRIL = 4, - G_DATE_MAY = 5, - G_DATE_JUNE = 6, - G_DATE_JULY = 7, - G_DATE_AUGUST = 8, - G_DATE_SEPTEMBER = 9, - G_DATE_OCTOBER = 10, - G_DATE_NOVEMBER = 11, - G_DATE_DECEMBER = 12 -} GDateMonth; - -#define G_DATE_BAD_JULIAN 0U -#define G_DATE_BAD_DAY 0U -#define G_DATE_BAD_YEAR 0U - -/* Note: directly manipulating structs is generally a bad idea, but - * in this case it's an *incredibly* bad idea, because all or part - * of this struct can be invalid at any given time. Use the functions, - * or you will get hosed, I promise. - */ -struct _GDate -{ - guint julian_days : 32; /* julian days representation - we use a - * bitfield hoping that 64 bit platforms - * will pack this whole struct in one big - * int - */ - - guint julian : 1; /* julian is valid */ - guint dmy : 1; /* dmy is valid */ - - /* DMY representation */ - guint day : 6; - guint month : 4; - guint year : 16; -}; - -/* g_date_new() returns an invalid date, you then have to _set() stuff - * to get a usable object. You can also allocate a GDate statically, - * then call g_date_clear() to initialize. - */ -GDate* g_date_new (void); -GDate* g_date_new_dmy (GDateDay day, - GDateMonth month, - GDateYear year); -GDate* g_date_new_julian (guint32 julian_day); -void g_date_free (GDate *date); - -/* check g_date_valid() after doing an operation that might fail, like - * _parse. Almost all g_date operations are undefined on invalid - * dates (the exceptions are the mutators, since you need those to - * return to validity). - */ -gboolean g_date_valid (const GDate *date); -gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST; -gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST; -gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST; -gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST; -gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST; -gboolean g_date_valid_dmy (GDateDay day, - GDateMonth month, - GDateYear year) G_GNUC_CONST; - -GDateWeekday g_date_get_weekday (const GDate *date); -GDateMonth g_date_get_month (const GDate *date); -GDateYear g_date_get_year (const GDate *date); -GDateDay g_date_get_day (const GDate *date); -guint32 g_date_get_julian (const GDate *date); -guint g_date_get_day_of_year (const GDate *date); -/* First monday/sunday is the start of week 1; if we haven't reached - * that day, return 0. These are not ISO weeks of the year; that - * routine needs to be added. - * these functions return the number of weeks, starting on the - * corrsponding day - */ -guint g_date_get_monday_week_of_year (const GDate *date); -guint g_date_get_sunday_week_of_year (const GDate *date); - -/* If you create a static date struct you need to clear it to get it - * in a sane state before use. You can clear a whole array at - * once with the ndates argument. - */ -void g_date_clear (GDate *date, - guint n_dates); - -/* The parse routine is meant for dates typed in by a user, so it - * permits many formats but tries to catch common typos. If your data - * needs to be strictly validated, it is not an appropriate function. - */ -void g_date_set_parse (GDate *date, - const gchar *str); -void g_date_set_time (GDate *date, - GTime time); -void g_date_set_month (GDate *date, - GDateMonth month); -void g_date_set_day (GDate *date, - GDateDay day); -void g_date_set_year (GDate *date, - GDateYear year); -void g_date_set_dmy (GDate *date, - GDateDay day, - GDateMonth month, - GDateYear y); -void g_date_set_julian (GDate *date, - guint32 julian_date); -gboolean g_date_is_first_of_month (const GDate *date); -gboolean g_date_is_last_of_month (const GDate *date); - -/* To go forward by some number of weeks just go forward weeks*7 days */ -void g_date_add_days (GDate *date, - guint n_days); -void g_date_subtract_days (GDate *date, - guint n_days); - -/* If you add/sub months while day > 28, the day might change */ -void g_date_add_months (GDate *date, - guint n_months); -void g_date_subtract_months (GDate *date, - guint n_months); - -/* If it's feb 29, changing years can move you to the 28th */ -void g_date_add_years (GDate *date, - guint n_years); -void g_date_subtract_years (GDate *date, - guint n_years); -gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST; -guint8 g_date_get_days_in_month (GDateMonth month, - GDateYear year) G_GNUC_CONST; -guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST; -guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST; - -/* Returns the number of days between the two dates. If date2 comes - before date1, a negative value is return. */ -gint g_date_days_between (const GDate *date1, - const GDate *date2); - -/* qsort-friendly (with a cast...) */ -gint g_date_compare (const GDate *lhs, - const GDate *rhs); -void g_date_to_struct_tm (const GDate *date, - struct tm *tm); - -void g_date_clamp (GDate *date, - const GDate *min_date, - const GDate *max_date); - -/* Swap date1 and date2's values if date1 > date2. */ -void g_date_order (GDate *date1, GDate *date2); - -/* Just like strftime() except you can only use date-related formats. - * Using a time format is undefined. - */ -gsize g_date_strftime (gchar *s, - gsize slen, - const gchar *format, - const GDate *date); - -#ifndef G_DISABLE_DEPRECATED - -#define g_date_weekday g_date_get_weekday -#define g_date_month g_date_get_month -#define g_date_year g_date_get_year -#define g_date_day g_date_get_day -#define g_date_julian g_date_get_julian -#define g_date_day_of_year g_date_get_day_of_year -#define g_date_monday_week_of_year g_date_get_monday_week_of_year -#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year -#define g_date_days_in_month g_date_get_days_in_month -#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year -#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year - -#endif /* G_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __G_DATE_H__ */ - diff --git a/gen-unicode-tables.pl b/gen-unicode-tables.pl deleted file mode 100755 index 1a3b91177..000000000 --- a/gen-unicode-tables.pl +++ /dev/null @@ -1,609 +0,0 @@ -#! /usr/bin/perl -w - -# Copyright (C) 1998, 1999 Tom Tromey - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# gen-unicode-tables.pl - Generate tables for libunicode from Unicode data. -# See http://www.unicode.org/Public/UNIDATA/UnicodeCharacterDatabase.html -# Usage: gen-unicode-tables.pl [-decomp | -both] UNICODE-VERSION UnicodeData.txt LineBreak.txt -# I consider the output of this program to be unrestricted. Use it as -# you will. - -# FIXME: -# * We could save even more space in the generated table by using -# indexes and not pointers. -# * For decomp table it might make sense to use a shift count other -# than 8. We could easily compute the perfect shift count. - -use vars qw($CODE $NAME $CATEGORY $COMBINING_CLASSES $BIDI_CATEGORY $DECOMPOSITION $DECIMAL_VALUE $DIGIT_VALUE $NUMERIC_VALUE $MIRRORED $OLD_NAME $COMMENT $UPPER $LOWER $TITLE $BREAK_CODE $BREAK_CATEGORY $BREAK_NAME); - -# Names of fields in Unicode data table. -$CODE = 0; -$NAME = 1; -$CATEGORY = 2; -$COMBINING_CLASSES = 3; -$BIDI_CATEGORY = 4; -$DECOMPOSITION = 5; -$DECIMAL_VALUE = 6; -$DIGIT_VALUE = 7; -$NUMERIC_VALUE = 8; -$MIRRORED = 9; -$OLD_NAME = 10; -$COMMENT = 11; -$UPPER = 12; -$LOWER = 13; -$TITLE = 14; - -# Names of fields in the line break table -$BREAK_CODE = 0; -$BREAK_PROPERTY = 1; -$BREAK_NAME = 2; - -# Map general category code onto symbolic name. -%mappings = - ( - # Normative. - 'Lu' => "G_UNICODE_UPPERCASE_LETTER", - 'Ll' => "G_UNICODE_LOWERCASE_LETTER", - 'Lt' => "G_UNICODE_TITLECASE_LETTER", - 'Mn' => "G_UNICODE_NON_SPACING_MARK", - 'Mc' => "G_UNICODE_COMBINING_MARK", - 'Me' => "G_UNICODE_ENCLOSING_MARK", - 'Nd' => "G_UNICODE_DECIMAL_NUMBER", - 'Nl' => "G_UNICODE_LETTER_NUMBER", - 'No' => "G_UNICODE_OTHER_NUMBER", - 'Zs' => "G_UNICODE_SPACE_SEPARATOR", - 'Zl' => "G_UNICODE_LINE_SEPARATOR", - 'Zp' => "G_UNICODE_PARAGRAPH_SEPARATOR", - 'Cc' => "G_UNICODE_CONTROL", - 'Cf' => "G_UNICODE_FORMAT", - 'Cs' => "G_UNICODE_SURROGATE", - 'Co' => "G_UNICODE_PRIVATE_USE", - 'Cn' => "G_UNICODE_UNASSIGNED", - - # Informative. - 'Lm' => "G_UNICODE_MODIFIER_LETTER", - 'Lo' => "G_UNICODE_OTHER_LETTER", - 'Pc' => "G_UNICODE_CONNECT_PUNCTUATION", - 'Pd' => "G_UNICODE_DASH_PUNCTUATION", - 'Ps' => "G_UNICODE_OPEN_PUNCTUATION", - 'Pe' => "G_UNICODE_CLOSE_PUNCTUATION", - 'Pi' => "G_UNICODE_INITIAL_PUNCTUATION", - 'Pf' => "G_UNICODE_FINAL_PUNCTUATION", - 'Po' => "G_UNICODE_OTHER_PUNCTUATION", - 'Sm' => "G_UNICODE_MATH_SYMBOL", - 'Sc' => "G_UNICODE_CURRENCY_SYMBOL", - 'Sk' => "G_UNICODE_MODIFIER_SYMBOL", - 'So' => "G_UNICODE_OTHER_SYMBOL" - ); - -%break_mappings = - ( - 'BK' => "G_UNICODE_BREAK_MANDATORY", - 'CR' => "G_UNICODE_BREAK_CARRIAGE_RETURN", - 'LF' => "G_UNICODE_BREAK_LINE_FEED", - 'CM' => "G_UNICODE_BREAK_COMBINING_MARK", - 'SG' => "G_UNICODE_BREAK_SURROGATE", - 'ZW' => "G_UNICODE_BREAK_ZERO_WIDTH_SPACE", - 'IN' => "G_UNICODE_BREAK_INSEPARABLE", - 'GL' => "G_UNICODE_BREAK_NON_BREAKING_GLUE", - 'CB' => "G_UNICODE_BREAK_CONTINGENT", - 'SP' => "G_UNICODE_BREAK_SPACE", - 'BA' => "G_UNICODE_BREAK_AFTER", - 'BB' => "G_UNICODE_BREAK_BEFORE", - 'B2' => "G_UNICODE_BREAK_BEFORE_AND_AFTER", - 'HY' => "G_UNICODE_BREAK_HYPHEN", - 'NS' => "G_UNICODE_BREAK_NON_STARTER", - 'OP' => "G_UNICODE_BREAK_OPEN_PUNCTUATION", - 'CL' => "G_UNICODE_BREAK_CLOSE_PUNCTUATION", - 'QU' => "G_UNICODE_BREAK_QUOTATION", - 'EX' => "G_UNICODE_BREAK_EXCLAMATION", - 'ID' => "G_UNICODE_BREAK_IDEOGRAPHIC", - 'NU' => "G_UNICODE_BREAK_NUMERIC", - 'IS' => "G_UNICODE_BREAK_INFIX_SEPARATOR", - 'SY' => "G_UNICODE_BREAK_SYMBOL", - 'AL' => "G_UNICODE_BREAK_ALPHABETIC", - 'PR' => "G_UNICODE_BREAK_PREFIX", - 'PO' => "G_UNICODE_BREAK_POSTFIX", - 'SA' => "G_UNICODE_BREAK_COMPLEX_CONTEXT", - 'AI' => "G_UNICODE_BREAK_AMBIGUOUS", - 'XX' => "G_UNICODE_BREAK_UNKNOWN" - ); - -# Title case mappings. -%title_to_lower = (); -%title_to_upper = (); - -$do_decomp = 0; -$do_props = 1; -if ($ARGV[0] eq '-decomp') -{ - $do_decomp = 1; - $do_props = 0; - shift @ARGV; -} -elsif ($ARGV[0] eq '-both') -{ - $do_decomp = 1; - shift @ARGV; -} - -print "Creating decomp table\n" if ($do_decomp); -print "Creating property table\n" if ($do_props); - -print "Unicode data from $ARGV[1]\n"; - -open (INPUT, "< $ARGV[1]") || exit 1; - -$last_code = -1; -while (<INPUT>) -{ - chop; - @fields = split (';', $_, 30); - if ($#fields != 14) - { - printf STDERR ("Entry for $fields[$CODE] has wrong number of fields (%d)\n", $#fields); - } - - $code = hex ($fields[$CODE]); - - last if ($code > 0xFFFF); # ignore characters out of the basic plane - - if ($code > $last_code + 1) - { - # Found a gap. - if ($fields[$NAME] =~ /Last>/) - { - # Fill the gap with the last character read, - # since this was a range specified in the char database - @gfields = @fields; - } - else - { - # The gap represents undefined characters. Only the type - # matters. - @gfields = ('', '', 'Cn', '0', '', '', '', '', '', '', '', - '', '', '', ''); - } - for (++$last_code; $last_code < $code; ++$last_code) - { - $gfields{$CODE} = sprintf ("%04x", $last_code); - &process_one ($last_code, @gfields); - } - } - &process_one ($code, @fields); - $last_code = $code; -} - -@gfields = ('', '', 'Cn', '0', '', '', '', '', '', '', '', - '', '', '', ''); -for (++$last_code; $last_code < 0x10000; ++$last_code) -{ - $gfields{$CODE} = sprintf ("%04x", $last_code); - &process_one ($last_code, @gfields); -} ---$last_code; # Want last to be 0xFFFF. - -print "Creating line break table\n"; - -print "Line break data from $ARGV[2]\n"; - -open (INPUT, "< $ARGV[2]") || exit 1; - -$last_code = -1; -while (<INPUT>) -{ - chop; - - next if /^#/; - - @fields = split (';', $_, 30); - if ($#fields != 2) - { - printf STDERR ("Entry for $fields[$CODE] has wrong number of fields (%d)\n", $#fields); - } - - $code = hex ($fields[$CODE]); - - last if ($code > 0xFFFF); # ignore characters out of the basic plane - - if ($code > $last_code + 1) - { - # Found a gap. - if ($fields[$NAME] =~ /Last>/) - { - # Fill the gap with the last character read, - # since this was a range specified in the char database - $gap_break_prop = $fields[$BREAK_PROPERTY]; - for (++$last_code; $last_code < $code; ++$last_code) - { - $break_props[$last_code] = $gap_break_prop; - } - } - else - { - # The gap represents undefined characters. If assigned, - # they are AL, if not assigned, XX - for (++$last_code; $last_code < $code; ++$last_code) - { - if ($type[$last_code] eq 'Cn') - { - $break_props[$last_code] = 'XX'; - } - else - { - $break_props[$last_code] = 'AL'; - } - } - } - } - $break_props[$code] = $fields[$BREAK_PROPERTY]; - $last_code = $code; -} - -for (++$last_code; $last_code < 0x10000; ++$last_code) -{ - if ($type[$last_code] eq 'Cn') - { - $break_props[$last_code] = 'XX'; - } - else - { - $break_props[$last_code] = 'AL'; - } -} ---$last_code; # Want last to be 0xFFFF. - -print STDERR "Last code is not 0xFFFF" if ($last_code != 0xFFFF); - -&print_tables ($last_code) - if $do_props; -&print_decomp ($last_code) - if $do_decomp; - -&print_line_break ($last_code); - -exit 0; - -# Process a single character. -sub process_one -{ - my ($code, @fields) = @_; - - $type[$code] = $fields[$CATEGORY]; - if ($type[$code] eq 'Nd') - { - $value[$code] = int ($fields[$DECIMAL_VALUE]); - } - elsif ($type[$code] eq 'Ll') - { - $value[$code] = hex ($fields[$UPPER]); - } - elsif ($type[$code] eq 'Lu') - { - $value[$code] = hex ($fields[$LOWER]); - } - - if ($type[$code] eq 'Lt') - { - $title_to_lower{$code} = hex ($fields[$LOWER]); - $title_to_upper{$code} = hex ($fields[$UPPER]); - } - - $cclass[$code] = $fields[$COMBINING_CLASSES]; - - # Handle decompositions. - if ($fields[$DECOMPOSITION] ne '' - && $fields[$DECOMPOSITION] !~ /\<.*\>/) - { - $decompositions[$code] = $fields[$DECOMPOSITION]; - } -} - -sub print_tables -{ - my ($last) = @_; - my ($outfile) = "gunichartables.h"; - - local ($bytes_out) = 0; - - print "Writing $outfile...\n"; - - open (OUT, "> $outfile"); - - print OUT "/* This file is automatically generated. DO NOT EDIT!\n"; - print OUT " Instead, edit gen-unicode-tables.pl and re-run. */\n\n"; - - print OUT "#ifndef CHARTABLES_H\n"; - print OUT "#define CHARTABLES_H\n\n"; - - print OUT "#define G_UNICODE_DATA_VERSION \"$ARGV[0]\"\n\n"; - - printf OUT "#define G_UNICODE_LAST_CHAR 0x%04x\n\n", $last; - - for ($count = 0; $count <= $last; $count += 256) - { - $row[$count / 256] = &print_row ($count, '(char *) ', 'char', 1, - 'page', \&fetch_type); - } - - print OUT "static char *type_table[256] = {\n"; - for ($count = 0; $count <= $last; $count += 256) - { - print OUT ",\n" if $count > 0; - print OUT " ", $row[$count / 256]; - $bytes_out += 4; - } - print OUT "\n};\n\n"; - - - # - # Now print attribute table. - # - - for ($count = 0; $count <= $last; $count += 256) - { - $row[$count / 256] = &print_row ($count, '', 'unsigned short', 2, - 'attrpage', \&fetch_attr); - } - print OUT "static unsigned short *attr_table[256] = {\n"; - for ($count = 0; $count <= $last; $count += 256) - { - print OUT ",\n" if $count > 0; - print OUT " ", $row[$count / 256]; - $bytes_out += 4; - } - print OUT "\n};\n\n"; - - # FIXME: type. - print OUT "static unsigned short title_table[][3] = {\n"; - my ($item); - my ($first) = 1; - foreach $item (sort keys %title_to_lower) - { - print OUT ",\n" - unless $first; - $first = 0; - printf OUT " { 0x%04x, 0x%04x, 0x%04x }", $item, $title_to_upper{$item}, $title_to_lower{$item}; - $bytes_out += 6; - } - print OUT "\n};\n\n"; - - print OUT "#endif /* CHARTABLES_H */\n"; - - close (OUT); - - printf STDERR "Generated %d bytes in tables\n", $bytes_out; -} - -# A fetch function for the type table. -sub fetch_type -{ - my ($index) = @_; - return $mappings{$type[$index]}; -} - -# A fetch function for the attribute table. -sub fetch_attr -{ - my ($index) = @_; - if (defined $value[$index]) - { - return sprintf ("0x%04x", $value[$index]); - } - else - { - return "0x0000"; - } -} - -# Print a single "row" of a two-level table. -sub print_row -{ - my ($start, $def_pfx, $typname, $typsize, $name, $fetcher) = @_; - - my ($i); - my (@values); - my ($flag) = 1; - my ($off); - - for ($off = 0; $off < 256; ++$off) - { - $values[$off] = $fetcher->($off + $start); - if ($values[$off] ne $values[0]) - { - $flag = 0; - } - } - if ($flag) - { - return $def_pfx . $values[0]; - } - - printf OUT "static %s %s%d[256] = {\n ", $typname, $name, $start / 256; - my ($column) = 2; - for ($i = $start; $i < $start + 256; ++$i) - { - print OUT ", " - if $i > $start; - my ($text) = $values[$i - $start]; - if (length ($text) + $column + 2 > 78) - { - print OUT "\n "; - $column = 2; - } - print OUT $text; - $column += length ($text) + 2; - } - print OUT "\n};\n\n"; - - $bytes_out += 256 * $typsize; - - return sprintf "%s%d", $name, $start / 256; -} - -# Generate the character decomposition header. -sub print_decomp -{ - my ($last) = @_; - my ($outfile) = "gunidecomp.h"; - - local ($bytes_out) = 0; - - print "Writing $outfile...\n"; - - open (OUT, "> $outfile") || exit 1; - - print OUT "/* This file is automatically generated. DO NOT EDIT! */\n\n"; - print OUT "#ifndef DECOMP_H\n"; - print OUT "#define DECOMP_H\n\n"; - - printf OUT "#define G_UNICODE_LAST_CHAR 0x%04x\n\n", $last; - - my ($count, @row); - for ($count = 0; $count <= $last; $count += 256) - { - $row[$count / 256] = &print_row ($count, '(unsigned char *) ', - 'unsigned char', 1, 'cclass', - \&fetch_cclass); - } - - print OUT "static unsigned char *combining_class_table[256] = {\n"; - for ($count = 0; $count <= $last; $count += 256) - { - print OUT ",\n" if $count > 0; - print OUT " ", $row[$count / 256]; - $bytes_out += 4; - } - print OUT "\n};\n\n"; - - print OUT "typedef struct\n{\n"; - # FIXME: type. - print OUT " unsigned short ch;\n"; - print OUT " unsigned char *expansion;\n"; - print OUT "} decomposition;\n\n"; - - print OUT "static decomposition decomp_table[] =\n{\n"; - my ($iter); - my ($first) = 1; - for ($count = 0; $count <= $last; ++$count) - { - if (defined $decompositions[$count]) - { - print OUT ",\n" - if ! $first; - $first = 0; - printf OUT " { 0x%04x, \"", $count; - $bytes_out += 2; - foreach $iter (&expand_decomp ($count)) - { - printf OUT "\\x%02x\\x%02x", $iter / 256, $iter & 0xff; - $bytes_out += 2; - } - # Only a single terminator because one is implied in the string. - print OUT "\\0\" }"; - $bytes_out += 2; - } - } - print OUT "\n};\n\n"; - - print OUT "#endif /* DECOMP_H */\n"; - - printf STDERR "Generated %d bytes in decomp tables\n", $bytes_out; -} - -sub print_line_break -{ - my ($last) = @_; - my ($outfile) = "gunibreak.h"; - - local ($bytes_out) = 0; - - print "Writing $outfile...\n"; - - open (OUT, "> $outfile"); - - print OUT "/* This file is automatically generated. DO NOT EDIT!\n"; - print OUT " Instead, edit gen-unicode-tables.pl and re-run. */\n\n"; - - print OUT "#ifndef BREAKTABLES_H\n"; - print OUT "#define BREAKTABLES_H\n\n"; - - print OUT "#define G_UNICODE_DATA_VERSION \"$ARGV[0]\"\n\n"; - - printf OUT "#define G_UNICODE_LAST_CHAR 0x%04x\n\n", $last; - - for ($count = 0; $count <= $last; $count += 256) - { - $row[$count / 256] = &print_row ($count, '(char *) ', 'char', 1, - 'page', - \&fetch_break_type); - } - - print OUT "static char *break_property_table[256] = {\n"; - for ($count = 0; $count <= $last; $count += 256) - { - print OUT ",\n" if $count > 0; - print OUT " ", $row[$count / 256]; - $bytes_out += 4; - } - print OUT "\n};\n\n"; - - print OUT "#endif /* BREAKTABLES_H */\n"; - - close (OUT); - - printf STDERR "Generated %d bytes in break tables\n", $bytes_out; -} - - -# A fetch function for the break properties table. -sub fetch_break_type -{ - my ($index) = @_; - return $break_mappings{$break_props[$index]}; -} - -# Fetcher for combining class. -sub fetch_cclass -{ - my ($i) = @_; - return $cclass[$i]; -} - -# Expand a character decomposition recursively. -sub expand_decomp -{ - my ($code) = @_; - - my ($iter, $val); - my (@result) = (); - foreach $iter (split (' ', $decompositions[$code])) - { - $val = hex ($iter); - if (defined $decompositions[$val]) - { - push (@result, &expand_decomp ($val)); - } - else - { - push (@result, $val); - } - } - - return @result; -} diff --git a/gerror.c b/gerror.c deleted file mode 100644 index eff62588a..000000000 --- a/gerror.c +++ /dev/null @@ -1,254 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#include "glib.h" - -static GError* -g_error_new_valist(GQuark domain, - gint code, - const gchar *format, - va_list args) -{ - GError *error; - - error = g_new (GError, 1); - - error->domain = domain; - error->code = code; - error->message = g_strdup_vprintf (format, args); - - return error; -} - -/** - * g_error_new: - * @domain: error domain - * @code: error code - * @format: printf()-style format for error message - * @Varargs: parameters for message format - * - * Creates a new #GError with the given @domain and @code, - * and a message formatted with @format. - * - * Return value: a new #GError - **/ -GError* -g_error_new (GQuark domain, - gint code, - const gchar *format, - ...) -{ - GError* error; - va_list args; - - g_return_val_if_fail (format != NULL, NULL); - g_return_val_if_fail (domain != 0, NULL); - - va_start (args, format); - error = g_error_new_valist (domain, code, format, args); - va_end (args); - - return error; -} - -/** - * g_error_new_literal: - * @domain: error domain - * @code: error code - * @message: error message - * - * Creates a new #GError; unlike g_error_new(), @message is not - * a printf()-style format string. Use this function if @message - * contains text you don't have control over, that could include - * printf() escape sequences. - * - * Return value: a new #GError - **/ -GError* -g_error_new_literal (GQuark domain, - gint code, - const gchar *message) -{ - GError* err; - - g_return_val_if_fail (message != NULL, NULL); - g_return_val_if_fail (domain != 0, NULL); - - err = g_new (GError, 1); - - err->domain = domain; - err->code = code; - err->message = g_strdup (message); - - return err; -} - -/** - * g_error_free: - * @error: a #GError - * - * Frees a #GError and associated resources. - * - **/ -void -g_error_free (GError *error) -{ - g_return_if_fail (error != NULL); - - g_free (error->message); - - g_free (error); -} - -/** - * g_error_copy: - * @error: a #GError - * - * Makes a copy of @error. - * - * Return value: a new #GError - **/ -GError* -g_error_copy (const GError *error) -{ - GError *copy; - - g_return_val_if_fail (error != NULL, NULL); - - copy = g_new (GError, 1); - - *copy = *error; - - copy->message = g_strdup (error->message); - - return copy; -} - -/** - * g_error_matches: - * @error: a #GError - * @domain: an error domain - * @code: an error code - * - * Returns TRUE if @error matches @domain and @code, FALSE - * otherwise. - * - * Return value: whether @error has @domain and @code - **/ -gboolean -g_error_matches (const GError *error, - GQuark domain, - gint code) -{ - return error && - error->domain == domain && - error->code == code; -} - -#define ERROR_OVERWRITTEN_WARNING "GError set over the top of a previous GError or uninitialized memory.\n" \ - "This indicates a bug in someone's code. You must ensure an error is NULL before it's set.\n" \ - "The overwriting error message was: %s" - -/** - * g_set_error: - * @err: a return location for a #GError, or NULL - * @domain: error domain - * @code: error code - * @format: printf()-style format - * @Varargs: args for @format - * - * Does nothing if @err is NULL; if @err is non-NULL, then *@err must - * be NULL. A new #GError is created and assigned to *@err. - **/ -void -g_set_error (GError **err, - GQuark domain, - gint code, - const gchar *format, - ...) -{ - GError *new; - - va_list args; - - if (err == NULL) - return; - - va_start (args, format); - new = g_error_new_valist (domain, code, format, args); - va_end (args); - - if (*err == NULL) - *err = new; - else - g_warning (ERROR_OVERWRITTEN_WARNING, new->message); -} - -/** - * g_propagate_error: - * @dest: error return location - * @src: error to move into the return location - * - * If @dest is NULL, free @src; otherwise, - * moves @src into *@dest. *@dest must be NULL. - **/ -void -g_propagate_error (GError **dest, - GError *src) -{ - g_return_if_fail (src != NULL); - - if (dest == NULL) - { - if (src) - g_error_free (src); - return; - } - else - { - if (*dest != NULL) - g_warning (ERROR_OVERWRITTEN_WARNING, src->message); - else - *dest = src; - } -} - -/** - * g_clear_error: - * @err: a #GError return location - * - * If @err is NULL, does nothing. If @err is non-NULL, - * calls g_error_free() on *@err and sets *@err to NULL. - **/ -void -g_clear_error (GError **err) -{ - if (err && *err) - { - g_error_free (*err); - *err = NULL; - } -} diff --git a/gerror.h b/gerror.h deleted file mode 100644 index a7eb8fdab..000000000 --- a/gerror.h +++ /dev/null @@ -1,74 +0,0 @@ -/* gerror.h - Error reporting system - * - * Copyright 2000 Red Hat, Inc. - * - * The Gnome Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Gnome Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __G_ERROR_H__ -#define __G_ERROR_H__ - -#include <gquark.h> - -G_BEGIN_DECLS - -typedef struct _GError GError; - -struct _GError -{ - GQuark domain; - gint code; - gchar *message; -}; - -GError* g_error_new (GQuark domain, - gint code, - const gchar *format, - ...) G_GNUC_PRINTF (3, 4); - -GError* g_error_new_literal (GQuark domain, - gint code, - const gchar *message); - -void g_error_free (GError *error); -GError* g_error_copy (const GError *error); - -gboolean g_error_matches (const GError *error, - GQuark domain, - gint code); - -/* if (err) *err = g_error_new(domain, code, format, ...), also has - * some sanity checks. - */ -void g_set_error (GError **err, - GQuark domain, - gint code, - const gchar *format, - ...) G_GNUC_PRINTF (4, 5); - -/* if (dest) *dest = src; also has some sanity checks. - */ -void g_propagate_error (GError **dest, - GError *src); - -/* if (err && *err) { g_error_free(*err); *err = NULL; } */ -void g_clear_error (GError **err); - - -G_END_DECLS - -#endif /* __G_ERROR_H__ */ - diff --git a/gfileutils.c b/gfileutils.c deleted file mode 100644 index 9936867ce..000000000 --- a/gfileutils.c +++ /dev/null @@ -1,698 +0,0 @@ -/* gfileutils.c - File utility functions - * - * Copyright 2000 Red Hat, Inc. - * - * GLib is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include "glib.h" - -#include <sys/stat.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <stdlib.h> - -#ifdef G_OS_WIN32 -#include <io.h> -#ifndef F_OK -#define F_OK 0 -#define X_OK 1 -#define W_OK 2 -#define R_OK 4 -#endif /* !F_OK */ - -#ifndef S_ISREG -#define S_ISREG(mode) ((mode)&_S_IFREG) -#endif - -#ifndef S_ISDIR -#define S_ISDIR(mode) ((mode)&_S_IFDIR) -#endif - -#endif /* G_OS_WIN32 */ - -#ifndef S_ISLNK -#define S_ISLNK(x) 0 -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -#include "glibintl.h" - -/** - * g_file_test: - * @filename: a filename to test - * @test: bitfield of #GFileTest flags - * - * Returns TRUE if any of the tests in the bitfield @test are - * TRUE. For example, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) - * will return TRUE if the file exists; the check whether it's - * a directory doesn't matter since the existence test is TRUE. - * With the current set of available tests, there's no point - * passing in more than one test at a time. - * - * Return value: whether a test was TRUE - **/ -gboolean -g_file_test (const gchar *filename, - GFileTest test) -{ - if (test & G_FILE_TEST_EXISTS) - return (access (filename, F_OK) == 0); - else if (test & G_FILE_TEST_IS_EXECUTABLE) - return (access (filename, X_OK) == 0); - else - { - struct stat s; - - if (stat (filename, &s) < 0) - return FALSE; - - if ((test & G_FILE_TEST_IS_REGULAR) && - S_ISREG (s.st_mode)) - return TRUE; - else if ((test & G_FILE_TEST_IS_DIR) && - S_ISDIR (s.st_mode)) - return TRUE; - else if ((test & G_FILE_TEST_IS_SYMLINK) && - S_ISLNK (s.st_mode)) - return TRUE; - else - return FALSE; - } -} - -GQuark -g_file_error_quark (void) -{ - static GQuark q = 0; - if (q == 0) - q = g_quark_from_static_string ("g-file-error-quark"); - - return q; -} - -/** - * g_file_error_from_errno: - * @err_no: an "errno" value - * - * Gets a #GFileError constant based on the passed-in errno. - * For example, if you pass in EEXIST this function returns - * #G_FILE_ERROR_EXIST. Unlike errno values, you can portably - * assume that all #GFileError values will exist. - * - * Normally a #GFileError value goes into a #GError returned - * from a function that manipulates files. So you would use - * g_file_error_from_errno() when constructing a #GError. - * - * Return value: #GFileError corresponding to the given errno - **/ -GFileError -g_file_error_from_errno (gint err_no) -{ - switch (err_no) - { -#ifdef EEXIST - case EEXIST: - return G_FILE_ERROR_EXIST; - break; -#endif - -#ifdef EISDIR - case EISDIR: - return G_FILE_ERROR_ISDIR; - break; -#endif - -#ifdef EACCES - case EACCES: - return G_FILE_ERROR_ACCES; - break; -#endif - -#ifdef ENAMETOOLONG - case ENAMETOOLONG: - return G_FILE_ERROR_NAMETOOLONG; - break; -#endif - -#ifdef ENOENT - case ENOENT: - return G_FILE_ERROR_NOENT; - break; -#endif - -#ifdef ENOTDIR - case ENOTDIR: - return G_FILE_ERROR_NOTDIR; - break; -#endif - -#ifdef ENXIO - case ENXIO: - return G_FILE_ERROR_NXIO; - break; -#endif - -#ifdef ENODEV - case ENODEV: - return G_FILE_ERROR_NODEV; - break; -#endif - -#ifdef EROFS - case EROFS: - return G_FILE_ERROR_ROFS; - break; -#endif - -#ifdef ETXTBSY - case ETXTBSY: - return G_FILE_ERROR_TXTBSY; - break; -#endif - -#ifdef EFAULT - case EFAULT: - return G_FILE_ERROR_FAULT; - break; -#endif - -#ifdef ELOOP - case ELOOP: - return G_FILE_ERROR_LOOP; - break; -#endif - -#ifdef ENOSPC - case ENOSPC: - return G_FILE_ERROR_NOSPC; - break; -#endif - -#ifdef ENOMEM - case ENOMEM: - return G_FILE_ERROR_NOMEM; - break; -#endif - -#ifdef EMFILE - case EMFILE: - return G_FILE_ERROR_MFILE; - break; -#endif - -#ifdef ENFILE - case ENFILE: - return G_FILE_ERROR_NFILE; - break; -#endif - -#ifdef EBADF - case EBADF: - return G_FILE_ERROR_BADF; - break; -#endif - -#ifdef EINVAL - case EINVAL: - return G_FILE_ERROR_INVAL; - break; -#endif - -#ifdef EPIPE - case EPIPE: - return G_FILE_ERROR_PIPE; - break; -#endif - -#ifdef EAGAIN - case EAGAIN: - return G_FILE_ERROR_AGAIN; - break; -#endif - -#ifdef EINTR - case EINTR: - return G_FILE_ERROR_INTR; - break; -#endif - -#ifdef EIO - case EIO: - return G_FILE_ERROR_IO; - break; -#endif - -#ifdef EPERM - case EPERM: - return G_FILE_ERROR_PERM; - break; -#endif - - default: - return G_FILE_ERROR_FAILED; - break; - } -} - -static gboolean -get_contents_stdio (const gchar *filename, - FILE *f, - gchar **contents, - gsize *length, - GError **error) -{ - gchar buf[2048]; - size_t bytes; - GString *str; - - g_assert (f != NULL); - - str = g_string_new (""); - - while (!feof (f)) - { - bytes = fread (buf, 1, 2048, f); - - if (ferror (f)) - { - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - _("Error reading file '%s': %s"), - filename, strerror (errno)); - - g_string_free (str, TRUE); - - return FALSE; - } - - g_string_append_len (str, buf, bytes); - } - - fclose (f); - - if (length) - *length = str->len; - - *contents = g_string_free (str, FALSE); - - return TRUE; -} - -#ifndef G_OS_WIN32 - -static gboolean -get_contents_regfile (const gchar *filename, - struct stat *stat_buf, - gint fd, - gchar **contents, - gsize *length, - GError **error) -{ - gchar *buf; - size_t bytes_read; - size_t size; - - size = stat_buf->st_size; - - buf = g_new (gchar, size + 1); - - bytes_read = 0; - while (bytes_read < size) - { - gssize rc; - - rc = read (fd, buf + bytes_read, size - bytes_read); - - if (rc < 0) - { - if (errno != EINTR) - { - close (fd); - - g_free (buf); - - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - _("Failed to read from file '%s': %s"), - filename, strerror (errno)); - - return FALSE; - } - } - else if (rc == 0) - break; - else - bytes_read += rc; - } - - buf[bytes_read] = '\0'; - - if (length) - *length = bytes_read; - - *contents = buf; - - return TRUE; -} - -static gboolean -get_contents_posix (const gchar *filename, - gchar **contents, - gsize *length, - GError **error) -{ - struct stat stat_buf; - gint fd; - - /* O_BINARY useful on Cygwin */ - fd = open (filename, O_RDONLY|O_BINARY); - - if (fd < 0) - { - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - _("Failed to open file '%s': %s"), - filename, strerror (errno)); - - return FALSE; - } - - /* I don't think this will ever fail, aside from ENOMEM, but. */ - if (fstat (fd, &stat_buf) < 0) - { - close (fd); - - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - _("Failed to get attributes of file '%s': fstat() failed: %s"), - filename, strerror (errno)); - - return FALSE; - } - - if (stat_buf.st_size > 0 && S_ISREG (stat_buf.st_mode)) - { - return get_contents_regfile (filename, - &stat_buf, - fd, - contents, - length, - error); - } - else - { - FILE *f; - - f = fdopen (fd, "r"); - - if (f == NULL) - { - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - _("Failed to open file '%s': fdopen() failed: %s"), - filename, strerror (errno)); - - return FALSE; - } - - return get_contents_stdio (filename, f, contents, length, error); - } -} - -#else /* G_OS_WIN32 */ - -static gboolean -get_contents_win32 (const gchar *filename, - gchar **contents, - gsize *length, - GError **error) -{ - FILE *f; - - /* I guess you want binary mode; maybe you want text sometimes? */ - f = fopen (filename, "rb"); - - if (f == NULL) - { - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - _("Failed to open file '%s': %s"), - filename, strerror (errno)); - - return FALSE; - } - - return get_contents_stdio (filename, f, contents, length, error); -} - -#endif - -/** - * g_file_get_contents: - * @filename: a file to read contents from - * @contents: location to store an allocated string - * @length: location to store length in bytes of the contents - * @error: return location for a #GError - * - * Reads an entire file into allocated memory, with good error - * checking. If @error is set, FALSE is returned, and @contents is set - * to NULL. If TRUE is returned, @error will not be set, and @contents - * will be set to the file contents. The string stored in @contents - * will be nul-terminated, so for text files you can pass NULL for the - * @length argument. The error domain is #G_FILE_ERROR. Possible - * error codes are those in the #GFileError enumeration. - * - * FIXME currently crashes if the file is too big to fit in memory; - * should probably use g_try_malloc() when we have that function. - * - * Return value: TRUE on success, FALSE if error is set - **/ -gboolean -g_file_get_contents (const gchar *filename, - gchar **contents, - gsize *length, - GError **error) -{ - g_return_val_if_fail (filename != NULL, FALSE); - g_return_val_if_fail (contents != NULL, FALSE); - - *contents = NULL; - if (length) - *length = 0; - -#ifdef G_OS_WIN32 - return get_contents_win32 (filename, contents, length, error); -#else - return get_contents_posix (filename, contents, length, error); -#endif -} - -/* - * mkstemp() implementation is from the GNU C library. - * Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc. - */ -/** - * g_mkstemp: - * @tmpl: template filename - * - * Open a temporary file. See "man mkstemp" on most UNIX-like systems. - * This is a portability wrapper, which simply calls mkstemp() on systems - * that have it, and implements it in GLib otherwise. - * - * The parameter is a string that should match the rules for mktemp, i.e. - * end in "XXXXXX". The X string will be modified to form the name - * of a file that didn't exist. - * - * Return value: A file handle (as from open()) to the file - * opened for reading and writing. The file is opened in binary mode - * on platforms where there is a difference. The file handle should be - * closed with close(). In case of errors, -1 is returned. - */ -int -g_mkstemp (char *tmpl) -{ -#ifdef HAVE_MKSTEMP - return mkstemp (tmpl); -#else - int len; - char *XXXXXX; - int count, fd; - static const char letters[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - static const int NLETTERS = sizeof (letters) - 1; - glong value; - GTimeVal tv; - static int counter = 0; - - len = strlen (tmpl); - if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX")) - return -1; - - /* This is where the Xs start. */ - XXXXXX = &tmpl[len - 6]; - - /* Get some more or less random data. */ - g_get_current_time (&tv); - value = (tv.tv_usec ^ tv.tv_sec) + counter++; - - for (count = 0; count < 100; value += 7777, ++count) - { - glong v = value; - - /* Fill in the random bits. */ - XXXXXX[0] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[1] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[2] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[3] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[4] = letters[v % NLETTERS]; - v /= NLETTERS; - XXXXXX[5] = letters[v % NLETTERS]; - - fd = open (tmpl, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600); - - if (fd >= 0) - return fd; - else if (errno != EEXIST) - /* Any other error will apply also to other names we might - * try, and there are 2^32 or so of them, so give up now. - */ - return -1; - } - - /* We got out of the loop because we ran out of combinations to try. */ - return -1; -#endif -} - -/** - * g_file_open_tmp: - * @tmpl: Template for file name, as in g_mkstemp, basename only - * @name_used: location to store actual name used - * @error: return location for a #GError - * - * Opens a file for writing in the preferred directory for temporary - * files (as returned by g_get_tmp_dir()). - * - * @tmpl should be a string ending with six 'X' characters, as the - * parameter to g_mkstemp() (or mkstemp()). However, unlike these - * functions, the template should only be a basename, no directory - * components are allowed. If template is NULL, a default template is - * used. - * - * Note that in contrast to g_mkstemp() (and mkstemp()) @tmpl is not - * modified, and might thus be a read-only literal string. - * - * The actual name used is returned in @name_used if non-NULL. This - * string should be freed with g_free when not needed any longer. - * - * Return value: A file handle (as from open()) to the file - * opened for reading and writing. The file is opened in binary mode - * on platforms where there is a difference. The file handle should be - * closed with close(). In case of errors, -1 is returned and - * @error will be set. - **/ -int -g_file_open_tmp (const char *tmpl, - char **name_used, - GError **error) -{ - int retval; - const char *tmpdir; - char *sep; - char *fulltemplate; - - if (tmpl == NULL) - tmpl = ".XXXXXX"; - - if (strchr (tmpl, G_DIR_SEPARATOR) -#ifdef G_OS_WIN32 - || strchr (tmpl, '/') -#endif - ) - { - g_set_error (error, - G_FILE_ERROR, - G_FILE_ERROR_FAILED, - _("Template '%s' illegal, should not contain a '%s'"), - tmpl, G_DIR_SEPARATOR_S); - - return -1; - } - - if (strlen (tmpl) < 6 || - strcmp (tmpl + strlen (tmpl) - 6, "XXXXXX") != 0) - { - g_set_error (error, - G_FILE_ERROR, - G_FILE_ERROR_FAILED, - _("Template '%s' doesn't end with XXXXXX"), - tmpl); - return -1; - } - - tmpdir = g_get_tmp_dir (); - - if (tmpdir [strlen (tmpdir) - 1] == G_DIR_SEPARATOR) - sep = ""; - else - sep = G_DIR_SEPARATOR_S; - - fulltemplate = g_strconcat (tmpdir, sep, tmpl, NULL); - - retval = g_mkstemp (fulltemplate); - - if (retval == -1) - { - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - _("Failed to create file '%s': %s"), - fulltemplate, strerror (errno)); - g_free (fulltemplate); - return -1; - } - - if (name_used) - *name_used = fulltemplate; - else - g_free (fulltemplate); - - return retval; -} diff --git a/gfileutils.h b/gfileutils.h deleted file mode 100644 index 717fa63ec..000000000 --- a/gfileutils.h +++ /dev/null @@ -1,95 +0,0 @@ -/* gfileutils.h - File utility functions - * - * Copyright 2000 Red Hat, Inc. - * - * GLib is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __G_FILEUTILS_H__ -#define __G_FILEUTILS_H__ - -#include <gerror.h> - -G_BEGIN_DECLS - -#define G_FILE_ERROR g_file_error_quark () - -typedef enum -{ - G_FILE_ERROR_EXIST, - G_FILE_ERROR_ISDIR, - G_FILE_ERROR_ACCES, - G_FILE_ERROR_NAMETOOLONG, - G_FILE_ERROR_NOENT, - G_FILE_ERROR_NOTDIR, - G_FILE_ERROR_NXIO, - G_FILE_ERROR_NODEV, - G_FILE_ERROR_ROFS, - G_FILE_ERROR_TXTBSY, - G_FILE_ERROR_FAULT, - G_FILE_ERROR_LOOP, - G_FILE_ERROR_NOSPC, - G_FILE_ERROR_NOMEM, - G_FILE_ERROR_MFILE, - G_FILE_ERROR_NFILE, - G_FILE_ERROR_BADF, - G_FILE_ERROR_INVAL, - G_FILE_ERROR_PIPE, - G_FILE_ERROR_AGAIN, - G_FILE_ERROR_INTR, - G_FILE_ERROR_IO, - G_FILE_ERROR_PERM, - G_FILE_ERROR_FAILED -} GFileError; - -/* For backward-compat reasons, these are synced to an old - * anonymous enum in libgnome. But don't use that enum - * in new code. - */ -typedef enum -{ - G_FILE_TEST_IS_REGULAR = 1 << 0, - G_FILE_TEST_IS_SYMLINK = 1 << 1, - G_FILE_TEST_IS_DIR = 1 << 2, - G_FILE_TEST_IS_EXECUTABLE = 1 << 3, - G_FILE_TEST_EXISTS = 1 << 4 -} GFileTest; - -GQuark g_file_error_quark (void); -/* So other code can generate a GFileError */ -GFileError g_file_error_from_errno (gint err_no); - -gboolean g_file_test (const gchar *filename, - GFileTest test); -gboolean g_file_get_contents (const gchar *filename, - gchar **contents, - gsize *length, - GError **error); - - -/* Wrapper / workalike for mkstemp() */ -int g_mkstemp (char *tmpl); - -/* Wrapper for g_mkstemp */ -int g_file_open_tmp (const char *tmpl, - char **name_used, - GError **error); - -G_END_DECLS - -#endif /* __G_FILEUTILS_H__ */ - - diff --git a/ghash.c b/ghash.c deleted file mode 100644 index 62f4b9596..000000000 --- a/ghash.c +++ /dev/null @@ -1,695 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glib.h" - - -#define HASH_TABLE_MIN_SIZE 11 -#define HASH_TABLE_MAX_SIZE 13845163 - - -typedef struct _GHashNode GHashNode; - -struct _GHashNode -{ - gpointer key; - gpointer value; - GHashNode *next; -}; - -struct _GHashTable -{ - gint size; - gint nnodes; - GHashNode **nodes; - GHashFunc hash_func; - GEqualFunc key_equal_func; - GDestroyNotify key_destroy_func; - GDestroyNotify value_destroy_func; -}; - - -static void g_hash_table_resize (GHashTable *hash_table); -static GHashNode** g_hash_table_lookup_node (GHashTable *hash_table, - gconstpointer key); -static GHashNode* g_hash_node_new (gpointer key, - gpointer value); -static void g_hash_node_destroy (GHashNode *hash_node, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func); -static void g_hash_nodes_destroy (GHashNode *hash_node, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func); -static guint g_hash_table_foreach_remove_or_steal (GHashTable *hash_table, - GHRFunc func, - gpointer user_data, - gboolean notify); - - -G_LOCK_DEFINE_STATIC (g_hash_global); - -static GMemChunk *node_mem_chunk = NULL; -static GHashNode *node_free_list = NULL; - -/** - * g_hash_table_new: - * @hash_func: a function to create a hash value from a key. - * Hash values are used to determine where keys are stored within the - * #GHashTable data structure. The g_direct_hash(), g_int_hash() and - * g_str_hash() functions are provided for some common types of keys. - * If hash_func is NULL, g_direct_hash() is used. - * @key_equal_func: a function to check two keys for equality. This is - * used when looking up keys in the #GHashTable. The g_direct_equal(), - * g_int_equal() and g_str_equal() functions are provided for the most - * common types of keys. If @key_equal_func is NULL, keys are compared - * directly in a similar fashion to g_direct_equal(), but without the - * overhead of a function call. - * - * Creates a new #GHashTable. - * - * Return value: a new #GHashTable. - **/ -GHashTable* -g_hash_table_new (GHashFunc hash_func, - GEqualFunc key_equal_func) -{ - return g_hash_table_new_full (hash_func, key_equal_func, NULL, NULL); -} - - -/** - * g_hash_table_new_full: - * @hash_func: a function to create a hash value from a key. - * @key_equal_func: a function to check two keys for equality. - * @key_destroy_func: a function to free the memory allocated for the key - * used when removing the entry from the #GHashTable or #NULL if you - * don't want to supply such a function. - * @value_destroy_func: a function to free the memory allocated for the - * value used when removing the entry from the #GHashTable or #NULL if - * you don't want to supply such a function. - * - * Creates a new #GHashTable like g_hash_table_new() and allows to specify - * functions to free the memory allocated for the key and value that get - * called when removing the entry from the #GHashTable. - * - * Return value: a new #GHashTable. - **/ -GHashTable* -g_hash_table_new_full (GHashFunc hash_func, - GEqualFunc key_equal_func, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func) -{ - GHashTable *hash_table; - guint i; - - hash_table = g_new (GHashTable, 1); - hash_table->size = HASH_TABLE_MIN_SIZE; - hash_table->nnodes = 0; - hash_table->hash_func = hash_func ? hash_func : g_direct_hash; - hash_table->key_equal_func = key_equal_func; - hash_table->key_destroy_func = key_destroy_func; - hash_table->value_destroy_func = value_destroy_func; - hash_table->nodes = g_new (GHashNode*, hash_table->size); - - for (i = 0; i < hash_table->size; i++) - hash_table->nodes[i] = NULL; - - return hash_table; -} - -/** - * g_hash_table_destroy: - * @hash_table: a #GHashTable. - * - * Destroys the #GHashTable. If keys and/or values are dynamically - * allocated, you should either free them first or create the #GHashTable - * using g_hash_table_new_full(). In the latter case the destroy functions - * you supplied will be called on all keys and values before destroying - * the #GHashTable. - **/ -void -g_hash_table_destroy (GHashTable *hash_table) -{ - guint i; - - g_return_if_fail (hash_table != NULL); - - for (i = 0; i < hash_table->size; i++) - g_hash_nodes_destroy (hash_table->nodes[i], - hash_table->key_destroy_func, - hash_table->value_destroy_func); - - g_free (hash_table->nodes); - g_free (hash_table); -} - -static inline GHashNode** -g_hash_table_lookup_node (GHashTable *hash_table, - gconstpointer key) -{ - GHashNode **node; - - node = &hash_table->nodes - [(* hash_table->hash_func) (key) % hash_table->size]; - - /* Hash table lookup needs to be fast. - * We therefore remove the extra conditional of testing - * whether to call the key_equal_func or not from - * the inner loop. - */ - if (hash_table->key_equal_func) - while (*node && !(*hash_table->key_equal_func) ((*node)->key, key)) - node = &(*node)->next; - else - while (*node && (*node)->key != key) - node = &(*node)->next; - - return node; -} - -/** - * g_hash_table_lookup: - * @hash_table: a #GHashTable. - * @key: the key to look up. - * - * Looks up a key in a #GHashTable. - * - * Return value: the associated value, or NULL if the key is not found. - **/ -gpointer -g_hash_table_lookup (GHashTable *hash_table, - gconstpointer key) -{ - GHashNode *node; - - g_return_val_if_fail (hash_table != NULL, NULL); - - node = *g_hash_table_lookup_node (hash_table, key); - - return node ? node->value : NULL; -} - -/** - * g_hash_table_lookup_extended: - * @hash_table: a #GHashTable. - * @lookup_key: the key to look up. - * @orig_key: returns the original key. - * @value: returns the value associated with the key. - * - * Looks up a key in the #GHashTable, returning the original key and the - * associated value and a gboolean which is TRUE if the key was found. This - * is useful if you need to free the memory allocated for the original key, - * for example before calling g_hash_table_remove(). - * - * Return value: #TRUE if the key was found in the #GHashTable. - **/ -gboolean -g_hash_table_lookup_extended (GHashTable *hash_table, - gconstpointer lookup_key, - gpointer *orig_key, - gpointer *value) -{ - GHashNode *node; - - g_return_val_if_fail (hash_table != NULL, FALSE); - - node = *g_hash_table_lookup_node (hash_table, lookup_key); - - if (node) - { - if (orig_key) - *orig_key = node->key; - if (value) - *value = node->value; - return TRUE; - } - else - return FALSE; -} - -/** - * g_hash_table_insert: - * @hash_table: a #GHashTable. - * @key: a key to insert. - * @value: the value to associate with the key. - * - * Inserts a new key and value into a #GHashTable. - * - * If the key already exists in the #GHashTable its current value is replaced - * with the new value. If you supplied a value_destroy_func when creating the - * #GHashTable, the old value is freed using that function. If you supplied - * a key_destroy_func when creating the #GHashTable, the passed key is freed - * using that function. - **/ -void -g_hash_table_insert (GHashTable *hash_table, - gpointer key, - gpointer value) -{ - GHashNode **node; - - g_return_if_fail (hash_table != NULL); - - node = g_hash_table_lookup_node (hash_table, key); - - if (*node) - { - /* do not reset node->key in this place, keeping - * the old key is the intended behaviour. - * g_hash_table_replace() can be used instead. - */ - - /* free the passed key */ - if (hash_table->key_destroy_func) - hash_table->key_destroy_func (key); - - if (hash_table->value_destroy_func) - hash_table->value_destroy_func ((*node)->value); - - (*node)->value = value; - } - else - { - *node = g_hash_node_new (key, value); - hash_table->nnodes++; - g_hash_table_resize (hash_table); - } -} - -/** - * g_hash_table_replace: - * @hash_table: a #GHashTable. - * @key: a key to insert. - * @value: the value to associate with the key. - * - * Inserts a new key and value into a #GHashTable similar to - * g_hash_table_insert(). The difference is that if the key already exists - * in the #GHashTable, it gets replaced by the new key. If you supplied a - * value_destroy_func when creating the #GHashTable, the old value is freed - * using that function. If you supplied a key_destroy_func when creating the - * #GHashTable, the old key is freed using that function. - **/ -void -g_hash_table_replace (GHashTable *hash_table, - gpointer key, - gpointer value) -{ - GHashNode **node; - - g_return_if_fail (hash_table != NULL); - - node = g_hash_table_lookup_node (hash_table, key); - - if (*node) - { - if (hash_table->key_destroy_func) - hash_table->key_destroy_func ((*node)->key); - - if (hash_table->value_destroy_func) - hash_table->value_destroy_func ((*node)->value); - - (*node)->key = key; - (*node)->value = value; - } - else - { - *node = g_hash_node_new (key, value); - hash_table->nnodes++; - g_hash_table_resize (hash_table); - } -} - -/** - * g_hash_table_remove: - * @hash_table: a #GHashTable. - * @key: the key to remove. - * - * Removes a key and its associated value from a #GHashTable. - * - * If the #GHashTable was created using g_hash_table_new_full(), the - * key and value are freed using the supplied destroy_functions, otherwise - * you have to make sure that any dynamically allocated values are freed - * yourself. - * - * Return value: #TRUE if the key was found and removed from the #GHashTable. - **/ -gboolean -g_hash_table_remove (GHashTable *hash_table, - gconstpointer key) -{ - GHashNode **node, *dest; - - g_return_val_if_fail (hash_table != NULL, FALSE); - - node = g_hash_table_lookup_node (hash_table, key); - if (*node) - { - dest = *node; - (*node) = dest->next; - g_hash_node_destroy (dest, - hash_table->key_destroy_func, - hash_table->value_destroy_func); - hash_table->nnodes--; - - g_hash_table_resize (hash_table); - - return TRUE; - } - - return FALSE; -} - -/** - * g_hash_table_steal: - * @hash_table: a #GHashTable. - * @key: the key to remove. - * - * Removes a key and its associated value from a #GHashTable without - * calling the key and value destroy functions. - * - * Return value: #TRUE if the key was found and removed from the #GHashTable. - **/ -gboolean -g_hash_table_steal (GHashTable *hash_table, - gconstpointer key) -{ - GHashNode **node, *dest; - - g_return_val_if_fail (hash_table != NULL, FALSE); - - node = g_hash_table_lookup_node (hash_table, key); - if (*node) - { - dest = *node; - (*node) = dest->next; - g_hash_node_destroy (dest, NULL, NULL); - hash_table->nnodes--; - - g_hash_table_resize (hash_table); - - return TRUE; - } - - return FALSE; -} - -/** - * g_hash_table_foreach_remove: - * @hash_table: a #GHashTable. - * @func: the function to call for each key/value pair. - * @user_data: user data to pass to the function. - * - * Calls the given function for each key/value pair in the #GHashTable. - * If the function returns TRUE, then the key/value pair is removed from the - * #GHashTable. If you supplied key or value destroy functions when creating - * the #GHashTable, they are used to free the memory allocated for the removed - * keys and values. - * - * Return value: the number of key/value pairs removed. - **/ -guint -g_hash_table_foreach_remove (GHashTable *hash_table, - GHRFunc func, - gpointer user_data) -{ - g_return_val_if_fail (hash_table != NULL, 0); - g_return_val_if_fail (func != NULL, 0); - - return g_hash_table_foreach_remove_or_steal (hash_table, func, user_data, TRUE); -} - -/** - * g_hash_table_foreach_steal: - * @hash_table: a #GHashTable. - * @func: the function to call for each key/value pair. - * @user_data: user data to pass to the function. - * - * Calls the given function for each key/value pair in the #GHashTable. - * If the function returns TRUE, then the key/value pair is removed from the - * #GHashTable, but no key or value destroy functions are called. - * - * Return value: the number of key/value pairs removed. - **/ -guint -g_hash_table_foreach_steal (GHashTable *hash_table, - GHRFunc func, - gpointer user_data) -{ - g_return_val_if_fail (hash_table != NULL, 0); - g_return_val_if_fail (func != NULL, 0); - - return g_hash_table_foreach_remove_or_steal (hash_table, func, user_data, FALSE); -} - -static guint -g_hash_table_foreach_remove_or_steal (GHashTable *hash_table, - GHRFunc func, - gpointer user_data, - gboolean notify) -{ - GHashNode *node, *prev; - guint i; - guint deleted = 0; - - for (i = 0; i < hash_table->size; i++) - { - restart: - - prev = NULL; - - for (node = hash_table->nodes[i]; node; prev = node, node = node->next) - { - if ((* func) (node->key, node->value, user_data)) - { - deleted += 1; - - hash_table->nnodes -= 1; - - if (prev) - { - prev->next = node->next; - g_hash_node_destroy (node, - notify ? hash_table->value_destroy_func : NULL, - notify ? hash_table->key_destroy_func : NULL); - node = prev; - } - else - { - hash_table->nodes[i] = node->next; - g_hash_node_destroy (node, - notify ? hash_table->value_destroy_func : NULL, - notify ? hash_table->key_destroy_func : NULL); - goto restart; - } - } - } - } - - g_hash_table_resize (hash_table); - - return deleted; -} - -/** - * g_hash_table_foreach: - * @hash_table: a #GHashTable. - * @func: the function to call for each key/value pair. - * @user_data: user data to pass to the function. - * - * Calls the given function for each of the key/value pairs in the #GHashTable. - * The function is passed the key and value of each pair, and the given - * @user_data parameter. - **/ -void -g_hash_table_foreach (GHashTable *hash_table, - GHFunc func, - gpointer user_data) -{ - GHashNode *node; - gint i; - - g_return_if_fail (hash_table != NULL); - g_return_if_fail (func != NULL); - - for (i = 0; i < hash_table->size; i++) - for (node = hash_table->nodes[i]; node; node = node->next) - (* func) (node->key, node->value, user_data); -} - -/** - * g_hash_table_size: - * @hash_table: a #GHashTable. - * - * Returns the number of elements contained in the #GHashTable. - * - * Return value: the number of key/value pairs in the #GHashTable. - **/ -guint -g_hash_table_size (GHashTable *hash_table) -{ - g_return_val_if_fail (hash_table != NULL, 0); - - return hash_table->nnodes; -} - -static void -g_hash_table_resize (GHashTable *hash_table) -{ - GHashNode **new_nodes; - GHashNode *node; - GHashNode *next; - gfloat nodes_per_list; - guint hash_val; - gint new_size; - gint i; - - nodes_per_list = (gfloat) hash_table->nnodes / (gfloat) hash_table->size; - - if ((nodes_per_list > 0.3 || hash_table->size <= HASH_TABLE_MIN_SIZE) && - (nodes_per_list < 3.0 || hash_table->size >= HASH_TABLE_MAX_SIZE)) - return; - - new_size = CLAMP(g_spaced_primes_closest (hash_table->nnodes), - HASH_TABLE_MIN_SIZE, - HASH_TABLE_MAX_SIZE); - new_nodes = g_new0 (GHashNode*, new_size); - - for (i = 0; i < hash_table->size; i++) - for (node = hash_table->nodes[i]; node; node = next) - { - next = node->next; - - hash_val = (* hash_table->hash_func) (node->key) % new_size; - - node->next = new_nodes[hash_val]; - new_nodes[hash_val] = node; - } - - g_free (hash_table->nodes); - hash_table->nodes = new_nodes; - hash_table->size = new_size; -} - -static GHashNode* -g_hash_node_new (gpointer key, - gpointer value) -{ - GHashNode *hash_node; - - G_LOCK (g_hash_global); - if (node_free_list) - { - hash_node = node_free_list; - node_free_list = node_free_list->next; - } - else - { - if (!node_mem_chunk) - node_mem_chunk = g_mem_chunk_new ("hash node mem chunk", - sizeof (GHashNode), - 1024, G_ALLOC_ONLY); - - hash_node = g_chunk_new (GHashNode, node_mem_chunk); - } - G_UNLOCK (g_hash_global); - - hash_node->key = key; - hash_node->value = value; - hash_node->next = NULL; - - return hash_node; -} - -static void -g_hash_node_destroy (GHashNode *hash_node, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func) -{ - if (key_destroy_func) - key_destroy_func (hash_node->key); - if (value_destroy_func) - value_destroy_func (hash_node->value); - -#ifdef ENABLE_GC_FRIENDLY - hash_node->key = NULL; - hash_node->value = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - G_LOCK (g_hash_global); - hash_node->next = node_free_list; - node_free_list = hash_node; - G_UNLOCK (g_hash_global); -} - -static void -g_hash_nodes_destroy (GHashNode *hash_node, - GFreeFunc key_destroy_func, - GFreeFunc value_destroy_func) -{ - if (hash_node) - { - GHashNode *node = hash_node; - - while (node->next) - { - if (key_destroy_func) - key_destroy_func (node->key); - if (value_destroy_func) - value_destroy_func (node->value); - -#ifdef ENABLE_GC_FRIENDLY - node->key = NULL; - node->value = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - node = node->next; - } - - if (key_destroy_func) - key_destroy_func (node->key); - if (value_destroy_func) - value_destroy_func (node->value); - -#ifdef ENABLE_GC_FRIENDLY - node->key = NULL; - node->value = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - G_LOCK (g_hash_global); - node->next = node_free_list; - node_free_list = hash_node; - G_UNLOCK (g_hash_global); - } -} diff --git a/ghash.h b/ghash.h deleted file mode 100644 index a9af5dc71..000000000 --- a/ghash.h +++ /dev/null @@ -1,108 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_HASH_H__ -#define __G_HASH_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef struct _GHashTable GHashTable; - -typedef gboolean (*GHRFunc) (gpointer key, - gpointer value, - gpointer user_data); - -/* Hash tables - */ -GHashTable* g_hash_table_new (GHashFunc hash_func, - GEqualFunc key_equal_func); -GHashTable* g_hash_table_new_full (GHashFunc hash_func, - GEqualFunc key_equal_func, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func); -void g_hash_table_destroy (GHashTable *hash_table); -void g_hash_table_insert (GHashTable *hash_table, - gpointer key, - gpointer value); -void g_hash_table_replace (GHashTable *hash_table, - gpointer key, - gpointer value); -gboolean g_hash_table_remove (GHashTable *hash_table, - gconstpointer key); -gboolean g_hash_table_steal (GHashTable *hash_table, - gconstpointer key); -gpointer g_hash_table_lookup (GHashTable *hash_table, - gconstpointer key); -gboolean g_hash_table_lookup_extended (GHashTable *hash_table, - gconstpointer lookup_key, - gpointer *orig_key, - gpointer *value); -void g_hash_table_foreach (GHashTable *hash_table, - GHFunc func, - gpointer user_data); -guint g_hash_table_foreach_remove (GHashTable *hash_table, - GHRFunc func, - gpointer user_data); -guint g_hash_table_foreach_steal (GHashTable *hash_table, - GHRFunc func, - gpointer user_data); -guint g_hash_table_size (GHashTable *hash_table); - -#ifndef G_DISABLE_DEPRECATED - -/* The following two functions are deprecated and will be removed in - * the next major release. They do no good. */ -#define g_hash_table_freeze(hash_table) ((void)0) -#define g_hash_table_thaw(hash_table) ((void)0) - -#endif /* G_DISABLE_DEPRECATED */ - -/* Hash Functions - */ -gboolean g_str_equal (gconstpointer v, - gconstpointer v2); -guint g_str_hash (gconstpointer v); - -gboolean g_int_equal (gconstpointer v, - gconstpointer v2) G_GNUC_CONST; -guint g_int_hash (gconstpointer v) G_GNUC_CONST; - -/* This "hash" function will just return the key's adress as an - * unsigned integer. Useful for hashing on plain adresses or - * simple integer values. - * passing NULL into g_hash_table_new() as GHashFunc has the - * same effect as passing g_direct_hash(). - */ -guint g_direct_hash (gconstpointer v) G_GNUC_CONST; -gboolean g_direct_equal (gconstpointer v, - gconstpointer v2) G_GNUC_CONST; - -G_END_DECLS - -#endif /* __G_HASH_H__ */ - diff --git a/ghook.c b/ghook.c deleted file mode 100644 index d04162fa1..000000000 --- a/ghook.c +++ /dev/null @@ -1,640 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * GHook: Callback maintenance functions - * Copyright (C) 1998 Tim Janik - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "glib.h" - - -/* --- defines --- */ -#define G_HOOKS_PREALLOC (16) - - -/* --- functions --- */ -static void -default_finalize_hook (GHookList *hook_list, - GHook *hook) -{ - GDestroyNotify destroy = hook->destroy; - - if (destroy) - { - hook->destroy = NULL; - destroy (hook->data); - } -} - -void -g_hook_list_init (GHookList *hook_list, - guint hook_size) -{ - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_size >= sizeof (GHook)); - g_return_if_fail (hook_size < 65536); - - hook_list->seq_id = 1; - hook_list->hook_size = hook_size; - hook_list->is_setup = TRUE; - hook_list->hooks = NULL; - hook_list->hook_memchunk = g_mem_chunk_new ("GHook Memchunk", - hook_size, - hook_size * G_HOOKS_PREALLOC, - G_ALLOC_AND_FREE); - hook_list->finalize_hook = default_finalize_hook; -} - -void -g_hook_list_clear (GHookList *hook_list) -{ - g_return_if_fail (hook_list != NULL); - - if (hook_list->is_setup) - { - GHook *hook; - - hook_list->is_setup = FALSE; - - hook = hook_list->hooks; - if (!hook) - { - g_mem_chunk_destroy (hook_list->hook_memchunk); - hook_list->hook_memchunk = NULL; - } - else - do - { - GHook *tmp; - - g_hook_ref (hook_list, hook); - g_hook_destroy_link (hook_list, hook); - tmp = hook->next; - g_hook_unref (hook_list, hook); - hook = tmp; - } - while (hook); - if (hook_list->hook_memchunk) - g_warning (G_STRLOC ": failed to clear hooklist, unconsolidated references on hooks left"); - } -} - -GHook* -g_hook_alloc (GHookList *hook_list) -{ - GHook *hook; - - g_return_val_if_fail (hook_list != NULL, NULL); - g_return_val_if_fail (hook_list->is_setup, NULL); - - hook = g_chunk_new0 (GHook, hook_list->hook_memchunk); - hook->data = NULL; - hook->next = NULL; - hook->prev = NULL; - hook->flags = G_HOOK_FLAG_ACTIVE; - hook->ref_count = 0; - hook->hook_id = 0; - hook->func = NULL; - hook->destroy = NULL; - - return hook; -} - -void -g_hook_free (GHookList *hook_list, - GHook *hook) -{ - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_list->is_setup); - g_return_if_fail (hook != NULL); - g_return_if_fail (G_HOOK_IS_UNLINKED (hook)); - g_return_if_fail (!G_HOOK_IN_CALL (hook)); - - hook_list->finalize_hook (hook_list, hook); - g_chunk_free (hook, hook_list->hook_memchunk); -} - -void -g_hook_destroy_link (GHookList *hook_list, - GHook *hook) -{ - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook != NULL); - - hook->flags &= ~G_HOOK_FLAG_ACTIVE; - if (hook->hook_id) - { - hook->hook_id = 0; - g_hook_unref (hook_list, hook); /* counterpart to g_hook_insert_before */ - } -} - -gboolean -g_hook_destroy (GHookList *hook_list, - gulong hook_id) -{ - GHook *hook; - - g_return_val_if_fail (hook_list != NULL, FALSE); - g_return_val_if_fail (hook_id > 0, FALSE); - - hook = g_hook_get (hook_list, hook_id); - if (hook) - { - g_hook_destroy_link (hook_list, hook); - return TRUE; - } - - return FALSE; -} - -void -g_hook_unref (GHookList *hook_list, - GHook *hook) -{ - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_list->hook_memchunk != NULL); - g_return_if_fail (hook != NULL); - g_return_if_fail (hook->ref_count > 0); - - hook->ref_count--; - if (!hook->ref_count) - { - g_return_if_fail (hook->hook_id == 0); - g_return_if_fail (!G_HOOK_IN_CALL (hook)); - - if (hook->prev) - hook->prev->next = hook->next; - else - hook_list->hooks = hook->next; - if (hook->next) - { - hook->next->prev = hook->prev; - hook->next = NULL; - } - hook->prev = NULL; - - if (!hook_list->is_setup) - { - hook_list->is_setup = TRUE; - g_hook_free (hook_list, hook); - hook_list->is_setup = FALSE; - - if (!hook_list->hooks) - { - g_mem_chunk_destroy (hook_list->hook_memchunk); - hook_list->hook_memchunk = NULL; - } - } - else - g_hook_free (hook_list, hook); - } -} - -void -g_hook_ref (GHookList *hook_list, - GHook *hook) -{ - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook != NULL); - g_return_if_fail (hook->ref_count > 0); - - hook->ref_count++; -} - -void -g_hook_prepend (GHookList *hook_list, - GHook *hook) -{ - g_return_if_fail (hook_list != NULL); - - g_hook_insert_before (hook_list, hook_list->hooks, hook); -} - -void -g_hook_insert_before (GHookList *hook_list, - GHook *sibling, - GHook *hook) -{ - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_list->is_setup); - g_return_if_fail (hook != NULL); - g_return_if_fail (G_HOOK_IS_UNLINKED (hook)); - g_return_if_fail (hook->ref_count == 0); - - hook->hook_id = hook_list->seq_id++; - hook->ref_count = 1; /* counterpart to g_hook_destroy_link */ - - if (sibling) - { - if (sibling->prev) - { - hook->prev = sibling->prev; - hook->prev->next = hook; - hook->next = sibling; - sibling->prev = hook; - } - else - { - hook_list->hooks = hook; - hook->next = sibling; - sibling->prev = hook; - } - } - else - { - if (hook_list->hooks) - { - sibling = hook_list->hooks; - while (sibling->next) - sibling = sibling->next; - hook->prev = sibling; - sibling->next = hook; - } - else - hook_list->hooks = hook; - } -} - -void -g_hook_list_invoke (GHookList *hook_list, - gboolean may_recurse) -{ - GHook *hook; - - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_list->is_setup); - - hook = g_hook_first_valid (hook_list, may_recurse); - while (hook) - { - GHookFunc func; - gboolean was_in_call; - - func = (GHookFunc) hook->func; - - was_in_call = G_HOOK_IN_CALL (hook); - hook->flags |= G_HOOK_FLAG_IN_CALL; - func (hook->data); - if (!was_in_call) - hook->flags &= ~G_HOOK_FLAG_IN_CALL; - - hook = g_hook_next_valid (hook_list, hook, may_recurse); - } -} - -void -g_hook_list_invoke_check (GHookList *hook_list, - gboolean may_recurse) -{ - GHook *hook; - - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_list->is_setup); - - hook = g_hook_first_valid (hook_list, may_recurse); - while (hook) - { - GHookCheckFunc func; - gboolean was_in_call; - gboolean need_destroy; - - func = (GHookCheckFunc) hook->func; - - was_in_call = G_HOOK_IN_CALL (hook); - hook->flags |= G_HOOK_FLAG_IN_CALL; - need_destroy = !func (hook->data); - if (!was_in_call) - hook->flags &= ~G_HOOK_FLAG_IN_CALL; - if (need_destroy) - g_hook_destroy_link (hook_list, hook); - - hook = g_hook_next_valid (hook_list, hook, may_recurse); - } -} - -void -g_hook_list_marshal_check (GHookList *hook_list, - gboolean may_recurse, - GHookCheckMarshaller marshaller, - gpointer data) -{ - GHook *hook; - - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_list->is_setup); - g_return_if_fail (marshaller != NULL); - - hook = g_hook_first_valid (hook_list, may_recurse); - while (hook) - { - gboolean was_in_call; - gboolean need_destroy; - - was_in_call = G_HOOK_IN_CALL (hook); - hook->flags |= G_HOOK_FLAG_IN_CALL; - need_destroy = !marshaller (hook, data); - if (!was_in_call) - hook->flags &= ~G_HOOK_FLAG_IN_CALL; - if (need_destroy) - g_hook_destroy_link (hook_list, hook); - - hook = g_hook_next_valid (hook_list, hook, may_recurse); - } -} - -void -g_hook_list_marshal (GHookList *hook_list, - gboolean may_recurse, - GHookMarshaller marshaller, - gpointer data) -{ - GHook *hook; - - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_list->is_setup); - g_return_if_fail (marshaller != NULL); - - hook = g_hook_first_valid (hook_list, may_recurse); - while (hook) - { - gboolean was_in_call; - - was_in_call = G_HOOK_IN_CALL (hook); - hook->flags |= G_HOOK_FLAG_IN_CALL; - marshaller (hook, data); - if (!was_in_call) - hook->flags &= ~G_HOOK_FLAG_IN_CALL; - - hook = g_hook_next_valid (hook_list, hook, may_recurse); - } -} - -GHook* -g_hook_first_valid (GHookList *hook_list, - gboolean may_be_in_call) -{ - g_return_val_if_fail (hook_list != NULL, NULL); - - if (hook_list->is_setup) - { - GHook *hook; - - hook = hook_list->hooks; - if (hook) - { - g_hook_ref (hook_list, hook); - if (G_HOOK_IS_VALID (hook) && (may_be_in_call || !G_HOOK_IN_CALL (hook))) - return hook; - else - return g_hook_next_valid (hook_list, hook, may_be_in_call); - } - } - - return NULL; -} - -GHook* -g_hook_next_valid (GHookList *hook_list, - GHook *hook, - gboolean may_be_in_call) -{ - GHook *ohook = hook; - - g_return_val_if_fail (hook_list != NULL, NULL); - - if (!hook) - return NULL; - - hook = hook->next; - while (hook) - { - if (G_HOOK_IS_VALID (hook) && (may_be_in_call || !G_HOOK_IN_CALL (hook))) - { - g_hook_ref (hook_list, hook); - g_hook_unref (hook_list, ohook); - - return hook; - } - hook = hook->next; - } - g_hook_unref (hook_list, ohook); - - return NULL; -} - -GHook* -g_hook_get (GHookList *hook_list, - gulong hook_id) -{ - GHook *hook; - - g_return_val_if_fail (hook_list != NULL, NULL); - g_return_val_if_fail (hook_id > 0, NULL); - - hook = hook_list->hooks; - while (hook) - { - if (hook->hook_id == hook_id) - return hook; - hook = hook->next; - } - - return NULL; -} - -GHook* -g_hook_find (GHookList *hook_list, - gboolean need_valids, - GHookFindFunc func, - gpointer data) -{ - GHook *hook; - - g_return_val_if_fail (hook_list != NULL, NULL); - g_return_val_if_fail (func != NULL, NULL); - - hook = hook_list->hooks; - while (hook) - { - GHook *tmp; - - /* test only non-destroyed hooks */ - if (!hook->hook_id) - { - hook = hook->next; - continue; - } - - g_hook_ref (hook_list, hook); - - if (func (hook, data) && hook->hook_id && (!need_valids || G_HOOK_ACTIVE (hook))) - { - g_hook_unref (hook_list, hook); - - return hook; - } - - tmp = hook->next; - g_hook_unref (hook_list, hook); - hook = tmp; - } - - return NULL; -} - -GHook* -g_hook_find_data (GHookList *hook_list, - gboolean need_valids, - gpointer data) -{ - GHook *hook; - - g_return_val_if_fail (hook_list != NULL, NULL); - - hook = hook_list->hooks; - while (hook) - { - /* test only non-destroyed hooks */ - if (hook->data == data && - hook->hook_id && - (!need_valids || G_HOOK_ACTIVE (hook))) - return hook; - - hook = hook->next; - } - - return NULL; -} - -GHook* -g_hook_find_func (GHookList *hook_list, - gboolean need_valids, - gpointer func) -{ - GHook *hook; - - g_return_val_if_fail (hook_list != NULL, NULL); - g_return_val_if_fail (func != NULL, NULL); - - hook = hook_list->hooks; - while (hook) - { - /* test only non-destroyed hooks */ - if (hook->func == func && - hook->hook_id && - (!need_valids || G_HOOK_ACTIVE (hook))) - return hook; - - hook = hook->next; - } - - return NULL; -} - -GHook* -g_hook_find_func_data (GHookList *hook_list, - gboolean need_valids, - gpointer func, - gpointer data) -{ - GHook *hook; - - g_return_val_if_fail (hook_list != NULL, NULL); - g_return_val_if_fail (func != NULL, NULL); - - hook = hook_list->hooks; - while (hook) - { - /* test only non-destroyed hooks */ - if (hook->data == data && - hook->func == func && - hook->hook_id && - (!need_valids || G_HOOK_ACTIVE (hook))) - return hook; - - hook = hook->next; - } - - return NULL; -} - -void -g_hook_insert_sorted (GHookList *hook_list, - GHook *hook, - GHookCompareFunc func) -{ - GHook *sibling; - - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook_list->is_setup); - g_return_if_fail (hook != NULL); - g_return_if_fail (G_HOOK_IS_UNLINKED (hook)); - g_return_if_fail (hook->func != NULL); - g_return_if_fail (func != NULL); - - /* first non-destroyed hook */ - sibling = hook_list->hooks; - while (sibling && !sibling->hook_id) - sibling = sibling->next; - - while (sibling) - { - GHook *tmp; - - g_hook_ref (hook_list, sibling); - if (func (hook, sibling) <= 0 && sibling->hook_id) - { - g_hook_unref (hook_list, sibling); - break; - } - - /* next non-destroyed hook */ - tmp = sibling->next; - while (tmp && !tmp->hook_id) - tmp = tmp->next; - - g_hook_unref (hook_list, sibling); - sibling = tmp; - } - - g_hook_insert_before (hook_list, sibling, hook); -} - -gint -g_hook_compare_ids (GHook *new_hook, - GHook *sibling) -{ - if (new_hook->hook_id < sibling->hook_id) - return -1; - else if (new_hook->hook_id > sibling->hook_id) - return 1; - - return 0; -} diff --git a/ghook.h b/ghook.h deleted file mode 100644 index 8942e5ada..000000000 --- a/ghook.h +++ /dev/null @@ -1,177 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_HOOK_H__ -#define __G_HOOK_H__ - -#include <gmem.h> - -G_BEGIN_DECLS - - -/* --- typedefs --- */ -typedef struct _GHook GHook; -typedef struct _GHookList GHookList; - -typedef gint (*GHookCompareFunc) (GHook *new_hook, - GHook *sibling); -typedef gboolean (*GHookFindFunc) (GHook *hook, - gpointer data); -typedef void (*GHookMarshaller) (GHook *hook, - gpointer marshal_data); -typedef gboolean (*GHookCheckMarshaller) (GHook *hook, - gpointer marshal_data); -typedef void (*GHookFunc) (gpointer data); -typedef gboolean (*GHookCheckFunc) (gpointer data); -typedef void (*GHookFinalizeFunc) (GHookList *hook_list, - GHook *hook); -typedef enum -{ - G_HOOK_FLAG_ACTIVE = 1 << 0, - G_HOOK_FLAG_IN_CALL = 1 << 1, - G_HOOK_FLAG_MASK = 0x0f -} GHookFlagMask; -#define G_HOOK_FLAG_USER_SHIFT (4) - - -/* --- structures --- */ -struct _GHookList -{ - gulong seq_id; - guint hook_size : 16; - guint is_setup : 1; - GHook *hooks; - GMemChunk *hook_memchunk; - GHookFinalizeFunc finalize_hook; -}; -struct _GHook -{ - gpointer data; - GHook *next; - GHook *prev; - guint ref_count; - gulong hook_id; - guint flags; - gpointer func; - GDestroyNotify destroy; -}; - - -/* --- macros --- */ -#define G_HOOK(hook) ((GHook*) (hook)) -#define G_HOOK_FLAGS(hook) (G_HOOK (hook)->flags) -#define G_HOOK_ACTIVE(hook) ((G_HOOK_FLAGS (hook) & \ - G_HOOK_FLAG_ACTIVE) != 0) -#define G_HOOK_IN_CALL(hook) ((G_HOOK_FLAGS (hook) & \ - G_HOOK_FLAG_IN_CALL) != 0) -#define G_HOOK_IS_VALID(hook) (G_HOOK (hook)->hook_id != 0 && \ - (G_HOOK_FLAGS (hook) & \ - G_HOOK_FLAG_ACTIVE)) -#define G_HOOK_IS_UNLINKED(hook) (G_HOOK (hook)->next == NULL && \ - G_HOOK (hook)->prev == NULL && \ - G_HOOK (hook)->hook_id == 0 && \ - G_HOOK (hook)->ref_count == 0) - - -/* --- prototypes --- */ -/* callback mainenance functions */ -void g_hook_list_init (GHookList *hook_list, - guint hook_size); -void g_hook_list_clear (GHookList *hook_list); -GHook* g_hook_alloc (GHookList *hook_list); -void g_hook_free (GHookList *hook_list, - GHook *hook); -void g_hook_ref (GHookList *hook_list, - GHook *hook); -void g_hook_unref (GHookList *hook_list, - GHook *hook); -gboolean g_hook_destroy (GHookList *hook_list, - gulong hook_id); -void g_hook_destroy_link (GHookList *hook_list, - GHook *hook); -void g_hook_prepend (GHookList *hook_list, - GHook *hook); -void g_hook_insert_before (GHookList *hook_list, - GHook *sibling, - GHook *hook); -void g_hook_insert_sorted (GHookList *hook_list, - GHook *hook, - GHookCompareFunc func); -GHook* g_hook_get (GHookList *hook_list, - gulong hook_id); -GHook* g_hook_find (GHookList *hook_list, - gboolean need_valids, - GHookFindFunc func, - gpointer data); -GHook* g_hook_find_data (GHookList *hook_list, - gboolean need_valids, - gpointer data); -GHook* g_hook_find_func (GHookList *hook_list, - gboolean need_valids, - gpointer func); -GHook* g_hook_find_func_data (GHookList *hook_list, - gboolean need_valids, - gpointer func, - gpointer data); -/* return the first valid hook, and increment its reference count */ -GHook* g_hook_first_valid (GHookList *hook_list, - gboolean may_be_in_call); -/* return the next valid hook with incremented reference count, and - * decrement the reference count of the original hook - */ -GHook* g_hook_next_valid (GHookList *hook_list, - GHook *hook, - gboolean may_be_in_call); -/* GHookCompareFunc implementation to insert hooks sorted by their id */ -gint g_hook_compare_ids (GHook *new_hook, - GHook *sibling); -/* convenience macros */ -#define g_hook_append( hook_list, hook ) \ - g_hook_insert_before ((hook_list), NULL, (hook)) -/* invoke all valid hooks with the (*GHookFunc) signature. - */ -void g_hook_list_invoke (GHookList *hook_list, - gboolean may_recurse); -/* invoke all valid hooks with the (*GHookCheckFunc) signature, - * and destroy the hook if FALSE is returned. - */ -void g_hook_list_invoke_check (GHookList *hook_list, - gboolean may_recurse); -/* invoke a marshaller on all valid hooks. - */ -void g_hook_list_marshal (GHookList *hook_list, - gboolean may_recurse, - GHookMarshaller marshaller, - gpointer marshal_data); -void g_hook_list_marshal_check (GHookList *hook_list, - gboolean may_recurse, - GHookCheckMarshaller marshaller, - gpointer marshal_data); - -G_END_DECLS - -#endif /* __G_HOOK_H__ */ - diff --git a/giochannel.c b/giochannel.c deleted file mode 100644 index a4d09b740..000000000 --- a/giochannel.c +++ /dev/null @@ -1,148 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * giochannel.c: IO Channel abstraction - * Copyright 1998 Owen Taylor - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "config.h" - -#include "glib.h" -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -void -g_io_channel_init (GIOChannel *channel) -{ - channel->channel_flags = 0; - channel->ref_count = 1; -} - - -void -g_io_channel_ref (GIOChannel *channel) -{ - g_return_if_fail (channel != NULL); - - channel->ref_count++; -} - -void -g_io_channel_unref (GIOChannel *channel) -{ - g_return_if_fail (channel != NULL); - - channel->ref_count--; - if (channel->ref_count == 0) - channel->funcs->io_free (channel); -} - -GIOError -g_io_channel_read (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_read) -{ - g_return_val_if_fail (channel != NULL, G_IO_ERROR_UNKNOWN); - - return channel->funcs->io_read (channel, buf, count, bytes_read); -} - -GIOError -g_io_channel_write (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written) -{ - g_return_val_if_fail (channel != NULL, G_IO_ERROR_UNKNOWN); - - return channel->funcs->io_write (channel, buf, count, bytes_written); -} - -GIOError -g_io_channel_seek (GIOChannel *channel, - gint offset, - GSeekType type) -{ - g_return_val_if_fail (channel != NULL, G_IO_ERROR_UNKNOWN); - - return channel->funcs->io_seek (channel, offset, type); -} - -void -g_io_channel_close (GIOChannel *channel) -{ - g_return_if_fail (channel != NULL); - - channel->funcs->io_close (channel); -} - -GSource * -g_io_create_watch (GIOChannel *channel, - GIOCondition condition) -{ - g_return_val_if_fail (channel != NULL, NULL); - - return channel->funcs->io_create_watch (channel, condition); -} - -guint -g_io_add_watch_full (GIOChannel *channel, - gint priority, - GIOCondition condition, - GIOFunc func, - gpointer user_data, - GDestroyNotify notify) -{ - GSource *source; - guint id; - - g_return_val_if_fail (channel != NULL, 0); - - source = g_io_create_watch (channel, condition); - - if (priority != G_PRIORITY_DEFAULT) - g_source_set_priority (source, priority); - g_source_set_callback (source, (GSourceFunc)func, user_data, notify); - - id = g_source_attach (source, NULL); - g_source_unref (source); - - return id; -} - -guint -g_io_add_watch (GIOChannel *channel, - GIOCondition condition, - GIOFunc func, - gpointer user_data) -{ - return g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, condition, func, user_data, NULL); -} diff --git a/giochannel.h b/giochannel.h deleted file mode 100644 index ed9c7c8c0..000000000 --- a/giochannel.h +++ /dev/null @@ -1,197 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_IOCHANNEL_H__ -#define __G_IOCHANNEL_H__ - -#include <gmain.h> -#include <gtypes.h> - -G_BEGIN_DECLS - -/* GIOChannel - */ - -typedef struct _GIOChannel GIOChannel; -typedef struct _GIOFuncs GIOFuncs; -typedef enum -{ - G_IO_ERROR_NONE, - G_IO_ERROR_AGAIN, - G_IO_ERROR_INVAL, - G_IO_ERROR_UNKNOWN -} GIOError; -typedef enum -{ - G_SEEK_CUR, - G_SEEK_SET, - G_SEEK_END -} GSeekType; -typedef enum -{ - G_IO_IN GLIB_SYSDEF_POLLIN, - G_IO_OUT GLIB_SYSDEF_POLLOUT, - G_IO_PRI GLIB_SYSDEF_POLLPRI, - G_IO_ERR GLIB_SYSDEF_POLLERR, - G_IO_HUP GLIB_SYSDEF_POLLHUP, - G_IO_NVAL GLIB_SYSDEF_POLLNVAL -} GIOCondition; - -struct _GIOChannel -{ - guint channel_flags; - guint ref_count; - GIOFuncs *funcs; -}; - -typedef gboolean (*GIOFunc) (GIOChannel *source, - GIOCondition condition, - gpointer data); -struct _GIOFuncs -{ - GIOError (*io_read) (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_read); - GIOError (*io_write) (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written); - GIOError (*io_seek) (GIOChannel *channel, - gint offset, - GSeekType type); - void (*io_close) (GIOChannel *channel); - GSource * (*io_create_watch) (GIOChannel *channel, - GIOCondition condition); - void (*io_free) (GIOChannel *channel); -}; - -void g_io_channel_init (GIOChannel *channel); -void g_io_channel_ref (GIOChannel *channel); -void g_io_channel_unref (GIOChannel *channel); -GIOError g_io_channel_read (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_read); -GIOError g_io_channel_write (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written); -GIOError g_io_channel_seek (GIOChannel *channel, - gint offset, - GSeekType type); -void g_io_channel_close (GIOChannel *channel); -guint g_io_add_watch_full (GIOChannel *channel, - gint priority, - GIOCondition condition, - GIOFunc func, - gpointer user_data, - GDestroyNotify notify); -GSource *g_io_create_watch (GIOChannel *channel, - GIOCondition condition); -guint g_io_add_watch (GIOChannel *channel, - GIOCondition condition, - GIOFunc func, - gpointer user_data); - -/* On Unix, IO channels created with this function for any file - * descriptor or socket. - * - * On Win32, this can be used either for files opened with the MSVCRT - * (the Microsoft run-time C library) _open() or _pipe, including file - * descriptors 0, 1 and 2 (corresponding to stdin, stdout and stderr), - * or for Winsock SOCKETs. If the parameter is a legal file - * descriptor, it is assumed to be such, otherwise it should be a - * SOCKET. This relies on SOCKETs and file descriptors not - * overlapping. If you want to be certain, call either - * g_io_channel_win32_new_fd() or g_io_channel_win32_new_socket() - * instead as appropriate. - * - * The term file descriptor as used in the context of Win32 refers to - * the emulated Unix-like file descriptors MSVCRT provides. The native - * corresponding concept is file HANDLE. There isn't as of yet a way to - * get GIOChannels for Win32 file HANDLEs. - */ -GIOChannel* g_io_channel_unix_new (int fd); -gint g_io_channel_unix_get_fd (GIOChannel *channel); - -#ifdef G_OS_WIN32 - -#define G_WIN32_MSG_HANDLE 19981206 - -/* Use this to get a GPollFD from a GIOChannel, so that you can call - * g_io_channel_win32_poll(). After calling this you should only use - * g_io_channel_read() to read from the GIOChannel, i.e. never read() - * from the underlying file descriptor. For SOCKETs, it is possible to call - * recv(). - */ -void g_io_channel_win32_make_pollfd (GIOChannel *channel, - GIOCondition condition, - GPollFD *fd); - -/* This can be used to wait a until at least one of the channels is readable. - * On Unix you would do a select() on the file descriptors of the channels. - */ -gint g_io_channel_win32_poll (GPollFD *fds, - gint n_fds, - gint timeout); - -/* This is used to add polling for Windows messages. GDK (GTk+) programs - * should *not* use this. - */ -void g_main_poll_win32_msg_add (gint priority, - GPollFD *fd, - guint hwnd); - -/* Create an IO channel for Windows messages for window handle hwnd. */ -GIOChannel *g_io_channel_win32_new_messages (guint hwnd); - -/* Create an IO channel for C runtime (emulated Unix-like) file - * descriptors. After calling g_io_add_watch() on a IO channel - * returned by this function, you shouldn't call read() on the file - * descriptor. This is because adding polling for a file descriptor is - * implemented on Win32 by starting a thread that sits blocked in a - * read() from the file descriptor most of the time. All reads from - * the file descriptor should be done by this internal GLib - * thread. Your code should call only g_io_channel_read(). - */ -GIOChannel* g_io_channel_win32_new_fd (int fd); - -/* Get the C runtime file descriptor of a channel. */ -gint g_io_channel_win32_get_fd (GIOChannel *channel); - -/* Create an IO channel for a winsock socket. The parameter should be - * a SOCKET. Contrary to IO channels for file descriptors (on *Win32), - * you can use normal recv() or recvfrom() on sockets even if GLib - * is polling them. - */ -GIOChannel *g_io_channel_win32_new_socket (gint socket); - -#endif - -G_END_DECLS - -#endif /* __G_IOCHANNEL_H__ */ diff --git a/giounix.c b/giounix.c deleted file mode 100644 index ca98e0c86..000000000 --- a/giounix.c +++ /dev/null @@ -1,312 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * giounix.c: IO Channels using unix file descriptors - * Copyright 1998 Owen Taylor - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "glib.h" -#include <sys/types.h> -#include <unistd.h> -#include <errno.h> - -/* - * Unix IO Channels - */ - -typedef struct _GIOUnixChannel GIOUnixChannel; -typedef struct _GIOUnixWatch GIOUnixWatch; - -struct _GIOUnixChannel -{ - GIOChannel channel; - gint fd; -}; - -struct _GIOUnixWatch -{ - GSource source; - GPollFD pollfd; - GIOChannel *channel; - GIOCondition condition; - GIOFunc callback; -}; - - -static GIOError g_io_unix_read (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written); -static GIOError g_io_unix_write (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written); -static GIOError g_io_unix_seek (GIOChannel *channel, - gint offset, - GSeekType type); -static void g_io_unix_close (GIOChannel *channel); -static void g_io_unix_free (GIOChannel *channel); -static GSource *g_io_unix_create_watch (GIOChannel *channel, - GIOCondition condition); - -static gboolean g_io_unix_prepare (GSource *source, - gint *timeout); -static gboolean g_io_unix_check (GSource *source); -static gboolean g_io_unix_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data); -static void g_io_unix_destroy (GSource *source); - -GSourceFuncs unix_watch_funcs = { - g_io_unix_prepare, - g_io_unix_check, - g_io_unix_dispatch, - g_io_unix_destroy -}; - -GIOFuncs unix_channel_funcs = { - g_io_unix_read, - g_io_unix_write, - g_io_unix_seek, - g_io_unix_close, - g_io_unix_create_watch, - g_io_unix_free, -}; - -static gboolean -g_io_unix_prepare (GSource *source, - gint *timeout) -{ - *timeout = -1; - return FALSE; -} - -static gboolean -g_io_unix_check (GSource *source) -{ - GIOUnixWatch *watch = (GIOUnixWatch *)source; - - return (watch->pollfd.revents & watch->condition); -} - -static gboolean -g_io_unix_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data) - -{ - GIOFunc func = (GIOFunc)callback; - GIOUnixWatch *watch = (GIOUnixWatch *)source; - - if (!func) - { - g_warning ("IO watch dispatched without callback\n" - "You must call g_source_connect()."); - return FALSE; - } - - return (*func) (watch->channel, - watch->pollfd.revents & watch->condition, - user_data); -} - -static void -g_io_unix_destroy (GSource *source) -{ - GIOUnixWatch *watch = (GIOUnixWatch *)source; - - g_io_channel_unref (watch->channel); -} - -static GIOError -g_io_unix_read (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_read) -{ - GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel; - gint result; - - result = read (unix_channel->fd, buf, count); - - if (result < 0) - { - *bytes_read = 0; - switch (errno) - { - case EINVAL: - return G_IO_ERROR_INVAL; - case EAGAIN: - case EINTR: - return G_IO_ERROR_AGAIN; - default: - return G_IO_ERROR_UNKNOWN; - } - } - else - { - *bytes_read = result; - return G_IO_ERROR_NONE; - } -} - -static GIOError -g_io_unix_write(GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written) -{ - GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel; - gint result; - - result = write (unix_channel->fd, buf, count); - - if (result < 0) - { - *bytes_written = 0; - switch (errno) - { - case EINVAL: - return G_IO_ERROR_INVAL; - case EAGAIN: - case EINTR: - return G_IO_ERROR_AGAIN; - default: - return G_IO_ERROR_UNKNOWN; - } - } - else - { - *bytes_written = result; - return G_IO_ERROR_NONE; - } -} - -static GIOError -g_io_unix_seek (GIOChannel *channel, - gint offset, - GSeekType type) -{ - GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel; - int whence; - off_t result; - - switch (type) - { - case G_SEEK_SET: - whence = SEEK_SET; - break; - case G_SEEK_CUR: - whence = SEEK_CUR; - break; - case G_SEEK_END: - whence = SEEK_END; - break; - default: - g_warning ("g_io_unix_seek: unknown seek type"); - return G_IO_ERROR_UNKNOWN; - } - - result = lseek (unix_channel->fd, offset, whence); - - if (result < 0) - { - switch (errno) - { - case EINVAL: - return G_IO_ERROR_INVAL; - default: - return G_IO_ERROR_UNKNOWN; - } - } - else - return G_IO_ERROR_NONE; -} - - -static void -g_io_unix_close (GIOChannel *channel) -{ - GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel; - - close (unix_channel->fd); -} - -static void -g_io_unix_free (GIOChannel *channel) -{ - GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel; - - g_free (unix_channel); -} - -static GSource * -g_io_unix_create_watch (GIOChannel *channel, - GIOCondition condition) -{ - GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel; - GSource *source; - GIOUnixWatch *watch; - - - source = g_source_new (&unix_watch_funcs, sizeof (GIOUnixWatch)); - watch = (GIOUnixWatch *)source; - - watch->channel = channel; - g_io_channel_ref (channel); - - watch->condition = condition; - - watch->pollfd.fd = unix_channel->fd; - watch->pollfd.events = condition; - - g_source_add_poll (source, &watch->pollfd); - - return source; -} - -GIOChannel * -g_io_channel_unix_new (gint fd) -{ - GIOUnixChannel *unix_channel = g_new (GIOUnixChannel, 1); - GIOChannel *channel = (GIOChannel *)unix_channel; - - g_io_channel_init (channel); - channel->funcs = &unix_channel_funcs; - - unix_channel->fd = fd; - return channel; -} - -gint -g_io_channel_unix_get_fd (GIOChannel *channel) -{ - GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel; - return unix_channel->fd; -} diff --git a/giowin32.c b/giowin32.c deleted file mode 100644 index 30507fd5c..000000000 --- a/giowin32.c +++ /dev/null @@ -1,1179 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * giowin32.c: IO Channels for Win32. - * Copyright 1998 Owen Taylor and Tor Lillqvist - * Copyright 1999-2000 Tor Lillqvist and Craig Setera - * Copyright 2001 Andrew Lanoix - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* Define this to get (very) verbose logging of all channels */ -/* #define G_IO_WIN32_DEBUG */ - -#include "glib.h" - -#include <stdlib.h> -#include <windows.h> -#include <winsock.h> /* Not everybody has winsock2 */ -#include <fcntl.h> -#include <io.h> -#include <process.h> -#include <errno.h> -#include <sys/stat.h> - -typedef struct _GIOWin32Channel GIOWin32Channel; -typedef struct _GIOWin32Watch GIOWin32Watch; - -#define BUFFER_SIZE 4096 - -typedef enum { - G_IO_WIN32_WINDOWS_MESSAGES, /* Windows messages */ - G_IO_WIN32_FILE_DESC, /* Unix-like file descriptors from - * _open() or _pipe(). Read with read(). - * Have to create separate thread to read. - */ - G_IO_WIN32_SOCKET /* Sockets. A separate thread is blocked - * in select() most of the time. - */ -} GIOWin32ChannelType; - -struct _GIOWin32Channel { - GIOChannel channel; - gint fd; /* Either a Unix-like file handle as provided - * by the Microsoft C runtime, or a SOCKET - * as provided by WinSock. - */ - GIOWin32ChannelType type; - - gboolean debug; - - CRITICAL_SECTION mutex; - - /* This is used by G_IO_WIN32_WINDOWS_MESSAGES channels */ - HWND hwnd; /* handle of window, or NULL */ - - /* Following fields are used by both fd and socket channels. */ - gboolean running; /* Is reader thread running. FALSE if - * EOF has been reached. - */ - gboolean needs_close; /* If the channel has been closed while - * the reader thread was still running. - */ - guint thread_id; /* If non-NULL has a reader thread, or has - * had.*/ - HANDLE thread_handle; - HANDLE data_avail_event; - - gushort revents; - - /* Following fields used by fd channels for input */ - - /* Data is kept in a circular buffer. To be able to distinguish between - * empty and full buffer, we cannot fill it completely, but have to - * leave a one character gap. - * - * Data available is between indexes rdp and wrp-1 (modulo BUFFER_SIZE). - * - * Empty: wrp == rdp - * Full: (wrp + 1) % BUFFER_SIZE == rdp - * Partial: otherwise - */ - guchar *buffer; /* (Circular) buffer */ - gint wrp, rdp; /* Buffer indices for writing and reading */ - HANDLE space_avail_event; - - /* Following fields used by socket channels */ - GSList *watches; - HANDLE data_avail_noticed_event; -}; - -#define LOCK(mutex) EnterCriticalSection (&mutex) -#define UNLOCK(mutex) LeaveCriticalSection (&mutex) - -struct _GIOWin32Watch { - GSource source; - GPollFD pollfd; - GIOChannel *channel; - GIOCondition condition; - GIOFunc callback; -}; - -static void -g_io_channel_win32_init (GIOWin32Channel *channel) -{ -#ifdef G_IO_WIN32_DEBUG - channel->debug = TRUE; -#else - if (getenv ("G_IO_WIN32_DEBUG") != NULL) - channel->debug = TRUE; - else - channel->debug = FALSE; -#endif - channel->buffer = NULL; - channel->running = FALSE; - channel->needs_close = FALSE; - channel->thread_id = 0; - channel->data_avail_event = NULL; - channel->revents = 0; - channel->space_avail_event = NULL; - channel->data_avail_noticed_event = NULL; - channel->watches = NULL; - InitializeCriticalSection (&channel->mutex); -} - -static void -create_events (GIOWin32Channel *channel) -{ - SECURITY_ATTRIBUTES sec_attrs; - - sec_attrs.nLength = sizeof(SECURITY_ATTRIBUTES); - sec_attrs.lpSecurityDescriptor = NULL; - sec_attrs.bInheritHandle = FALSE; - - /* The data available event is manual reset, the space available event - * is automatic reset. - */ - if (!(channel->data_avail_event = CreateEvent (&sec_attrs, TRUE, FALSE, NULL)) - || !(channel->space_avail_event = CreateEvent (&sec_attrs, FALSE, FALSE, NULL)) - || !(channel->data_avail_noticed_event = CreateEvent (&sec_attrs, FALSE, FALSE, NULL))) - { - gchar *msg = g_win32_error_message (GetLastError ()); - g_error ("Error creating event: %s", msg); - } -} - -static unsigned __stdcall -read_thread (void *parameter) -{ - GIOWin32Channel *channel = parameter; - GSList *tmp; - guchar *buffer; - guint nbytes; - - g_io_channel_ref ((GIOChannel *)channel); - - if (channel->debug) - g_print ("read_thread %#x: start fd:%d, data_avail:%#x, space_avail:%#x\n", - channel->thread_id, - channel->fd, - (guint) channel->data_avail_event, - (guint) channel->space_avail_event); - - channel->buffer = g_malloc (BUFFER_SIZE); - channel->rdp = channel->wrp = 0; - channel->running = TRUE; - - SetEvent (channel->space_avail_event); - - while (channel->running) - { - LOCK (channel->mutex); - if (channel->debug) - g_print ("read_thread %#x: rdp=%d, wrp=%d\n", - channel->thread_id, channel->rdp, channel->wrp); - if ((channel->wrp + 1) % BUFFER_SIZE == channel->rdp) - { - /* Buffer is full */ - if (channel->debug) - g_print ("read_thread %#x: resetting space_avail\n", - channel->thread_id); - ResetEvent (channel->space_avail_event); - if (channel->debug) - g_print ("read_thread %#x: waiting for space\n", - channel->thread_id); - UNLOCK (channel->mutex); - WaitForSingleObject (channel->space_avail_event, INFINITE); - LOCK (channel->mutex); - if (channel->debug) - g_print ("read_thread %#x: rdp=%d, wrp=%d\n", - channel->thread_id, channel->rdp, channel->wrp); - } - - buffer = channel->buffer + channel->wrp; - - /* Always leave at least one byte unused gap to be able to - * distinguish between the full and empty condition... - */ - nbytes = MIN ((channel->rdp + BUFFER_SIZE - channel->wrp - 1) % BUFFER_SIZE, - BUFFER_SIZE - channel->wrp); - - if (channel->debug) - g_print ("read_thread %#x: calling read() for %d bytes\n", - channel->thread_id, nbytes); - - UNLOCK (channel->mutex); - - nbytes = read (channel->fd, buffer, nbytes); - - LOCK (channel->mutex); - - channel->revents = G_IO_IN; - if (nbytes == 0) - channel->revents |= G_IO_HUP; - else if (nbytes < 0) - channel->revents |= G_IO_ERR; - - if (channel->debug) - g_print ("read_thread %#x: read() returned %d, rdp=%d, wrp=%d\n", - channel->thread_id, nbytes, channel->rdp, channel->wrp); - - if (nbytes <= 0) - break; - - channel->wrp = (channel->wrp + nbytes) % BUFFER_SIZE; - if (channel->debug) - g_print ("read_thread %#x: rdp=%d, wrp=%d, setting data_avail\n", - channel->thread_id, channel->rdp, channel->wrp); - SetEvent (channel->data_avail_event); - UNLOCK (channel->mutex); - } - - channel->running = FALSE; - if (channel->needs_close) - { - if (channel->debug) - g_print ("read_thread %#x: channel fd %d needs closing\n", - channel->thread_id, channel->fd); - close (channel->fd); - channel->fd = -1; - } - - if (channel->debug) - g_print ("read_thread %#x: EOF, rdp=%d, wrp=%d, setting data_avail\n", - channel->thread_id, channel->rdp, channel->wrp); - SetEvent (channel->data_avail_event); - UNLOCK (channel->mutex); - - g_io_channel_unref((GIOChannel *)channel); - - /* No need to call _endthreadex(), the actual thread starter routine - * in MSVCRT (see crt/src/threadex.c:_threadstartex) calls - * _endthreadex() for us. - */ - - CloseHandle (channel->thread_handle); - - return 0; -} - -static void -create_thread (GIOWin32Channel *channel, - GIOCondition condition, - unsigned (__stdcall *thread) (void *parameter)) -{ - channel->thread_handle = - (HANDLE) _beginthreadex (NULL, 0, thread, channel, 0, - &channel->thread_id); - if (channel->thread_handle == 0) - g_warning (G_STRLOC ": Error creating reader thread: %s", - strerror (errno)); - WaitForSingleObject (channel->space_avail_event, INFINITE); -} - -static int -buffer_read (GIOWin32Channel *channel, - guchar *dest, - guint count, - GIOError *error) -{ - guint nbytes; - guint left = count; - - LOCK (channel->mutex); - if (channel->debug) - g_print ("reading from thread %#x %d bytes, rdp=%d, wrp=%d\n", - channel->thread_id, count, channel->rdp, channel->wrp); - - if (channel->wrp == channel->rdp) - { - UNLOCK (channel->mutex); - if (channel->debug) - g_print ("waiting for data from thread %#x\n", channel->thread_id); - WaitForSingleObject (channel->data_avail_event, INFINITE); - if (channel->debug) - g_print ("done waiting for data from thread %#x\n", channel->thread_id); - LOCK (channel->mutex); - if (channel->wrp == channel->rdp && !channel->running) - { - UNLOCK (channel->mutex); - return 0; - } - } - - if (channel->rdp < channel->wrp) - nbytes = channel->wrp - channel->rdp; - else - nbytes = BUFFER_SIZE - channel->rdp; - UNLOCK (channel->mutex); - nbytes = MIN (left, nbytes); - if (channel->debug) - g_print ("moving %d bytes from thread %#x\n", - nbytes, channel->thread_id); - memcpy (dest, channel->buffer + channel->rdp, nbytes); - dest += nbytes; - left -= nbytes; - LOCK (channel->mutex); - channel->rdp = (channel->rdp + nbytes) % BUFFER_SIZE; - if (channel->debug) - g_print ("setting space_avail for thread %#x\n", channel->thread_id); - SetEvent (channel->space_avail_event); - if (channel->debug) - g_print ("for thread %#x: rdp=%d, wrp=%d\n", - channel->thread_id, channel->rdp, channel->wrp); - if (channel->running && channel->wrp == channel->rdp) - { - if (channel->debug) - g_print ("resetting data_avail of thread %#x\n", - channel->thread_id); - ResetEvent (channel->data_avail_event); - }; - UNLOCK (channel->mutex); - - /* We have no way to indicate any errors form the actual - * read() or recv() call in the reader thread. Should we have? - */ - *error = G_IO_ERROR_NONE; - return count - left; -} - -static unsigned __stdcall -select_thread (void *parameter) -{ - GIOWin32Channel *channel = parameter; - fd_set read_fds, write_fds, except_fds; - GSList *tmp; - int n; - - g_io_channel_ref ((GIOChannel *)channel); - - if (channel->debug) - g_print ("select_thread %#x: start fd:%d,\n\tdata_avail:%#x, data_avail_noticed:%#x\n", - channel->thread_id, - channel->fd, - (guint) channel->data_avail_event, - (guint) channel->data_avail_noticed_event); - - channel->rdp = channel->wrp = 0; - channel->running = TRUE; - - SetEvent (channel->space_avail_event); - - while (channel->running) - { - FD_ZERO (&read_fds); - FD_ZERO (&write_fds); - FD_ZERO (&except_fds); - - tmp = channel->watches; - while (tmp) - { - GIOWin32Watch *watch = (GIOWin32Watch *)tmp->data; - - if (watch->condition & (G_IO_IN | G_IO_HUP)) - FD_SET (channel->fd, &read_fds); - if (watch->condition & G_IO_OUT) - FD_SET (channel->fd, &write_fds); - if (watch->condition & G_IO_ERR) - FD_SET (channel->fd, &except_fds); - - tmp = tmp->next; - } - if (channel->debug) - g_print ("select_thread %#x: calling select() for%s%s%s\n", - channel->thread_id, - (FD_ISSET (channel->fd, &read_fds) ? " IN" : ""), - (FD_ISSET (channel->fd, &write_fds) ? " OUT" : ""), - (FD_ISSET (channel->fd, &except_fds) ? " ERR" : "")); - - n = select (1, &read_fds, &write_fds, &except_fds, NULL); - - if (n == SOCKET_ERROR) - { - if (channel->debug) - g_print ("select_thread %#x: select returned SOCKET_ERROR\n", - channel->thread_id); - break; - } - - if (channel->debug) - g_print ("select_thread %#x: got%s%s%s\n", - channel->thread_id, - (FD_ISSET (channel->fd, &read_fds) ? " IN" : ""), - (FD_ISSET (channel->fd, &write_fds) ? " OUT" : ""), - (FD_ISSET (channel->fd, &except_fds) ? " ERR" : "")); - - if (FD_ISSET (channel->fd, &read_fds)) - channel->revents |= G_IO_IN; - if (FD_ISSET (channel->fd, &write_fds)) - channel->revents |= G_IO_OUT; - if (FD_ISSET (channel->fd, &except_fds)) - channel->revents |= G_IO_ERR; - - if (channel->debug) - g_print ("select_thread %#x: resetting data_avail_noticed,\n" - "\tsetting data_avail\n", - channel->thread_id); - ResetEvent (channel->data_avail_noticed_event); - SetEvent (channel->data_avail_event); - - LOCK (channel->mutex); - if (channel->needs_close) - { - UNLOCK (channel->mutex); - break; - } - UNLOCK (channel->mutex); - - if (channel->debug) - g_print ("select_thread %#x: waiting for data_avail_noticed\n", - channel->thread_id); - - WaitForSingleObject (channel->data_avail_noticed_event, INFINITE); - if (channel->debug) - g_print ("select_thread %#x: got data_avail_noticed\n", - channel->thread_id); - } - - channel->running = FALSE; - LOCK (channel->mutex); - if (channel->fd != -1) - { - if (channel->debug) - g_print ("select_thread %#x: channel fd %d needs closing\n", - channel->thread_id, channel->fd); - closesocket (channel->fd); - channel->fd = -1; - } - - if (channel->debug) - g_print ("select_thread %#x: got error, setting data_avail\n", - channel->thread_id); - SetEvent (channel->data_avail_event); - UNLOCK (channel->mutex); - - g_io_channel_unref((GIOChannel *)channel); - - /* No need to call _endthreadex(), the actual thread starter routine - * in MSVCRT (see crt/src/threadex.c:_threadstartex) calls - * _endthreadex() for us. - */ - - CloseHandle (channel->thread_handle); - - return 0; -} - -static gboolean -g_io_win32_prepare (GSource *source, - gint *timeout) -{ - GIOWin32Watch *watch = (GIOWin32Watch *)source; - GIOWin32Channel *channel = (GIOWin32Channel *)watch->channel; - - *timeout = -1; - - if (channel->type == G_IO_WIN32_FILE_DESC) - { - LOCK (channel->mutex); - if (channel->running && channel->wrp == channel->rdp) - channel->revents = 0; - UNLOCK (channel->mutex); - } - else if (channel->type == G_IO_WIN32_SOCKET) - { - channel->revents = 0; - - if (channel->debug) - g_print ("g_io_win32_prepare: thread %#x, setting data_avail_noticed\n", - channel->thread_id); - SetEvent (channel->data_avail_noticed_event); - if (channel->debug) - g_print ("g_io_win32_prepare: thread %#x, there.\n", - channel->thread_id); - } - - return FALSE; -} - -static gboolean -g_io_win32_check (GSource *source) -{ - MSG msg; - GIOWin32Watch *watch = (GIOWin32Watch *)source; - GIOWin32Channel *channel = (GIOWin32Channel *)watch->channel; - - if (channel->debug) - g_print ("g_io_win32_check: for thread %#x:\n" - "\twatch->pollfd.events:%#x, watch->pollfd.revents:%#x, channel->revents:%#x\n", - channel->thread_id, - watch->pollfd.events, watch->pollfd.revents, channel->revents); - - if (channel->type != G_IO_WIN32_WINDOWS_MESSAGES) - { - watch->pollfd.revents = (watch->pollfd.events & channel->revents); - } - else - { - return (PeekMessage (&msg, channel->hwnd, 0, 0, PM_NOREMOVE)); - } - - if (channel->type == G_IO_WIN32_SOCKET) - { - if (channel->debug) - g_print ("g_io_win32_check: thread %#x, resetting data_avail\n", - channel->thread_id); - ResetEvent (channel->data_avail_event); - if (channel->debug) - g_print ("g_io_win32_check: thread %#x, there.\n", - channel->thread_id); - } - - return (watch->pollfd.revents & watch->condition); -} - -static gboolean -g_io_win32_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data) -{ - GIOFunc func = (GIOFunc)callback; - GIOWin32Watch *watch = (GIOWin32Watch *)source; - - if (!func) - { - g_warning (G_STRLOC ": GIOWin32Watch dispatched without callback\n" - "You must call g_source_connect()."); - return FALSE; - } - - return (*func) (watch->channel, - watch->pollfd.revents & watch->condition, - user_data); -} - -static void -g_io_win32_destroy (GSource *source) -{ - GIOWin32Watch *watch = (GIOWin32Watch *)source; - GIOWin32Channel *channel = (GIOWin32Channel *)watch->channel; - - if (channel->debug) - g_print ("g_io_win32_destroy: channel with thread %#x\n", - channel->thread_id); - - channel->watches = g_slist_remove (channel->watches, watch); - - SetEvent (channel->data_avail_noticed_event); - g_io_channel_unref (watch->channel); -} - -static GSourceFuncs win32_watch_funcs = { - g_io_win32_prepare, - g_io_win32_check, - g_io_win32_dispatch, - g_io_win32_destroy -}; - -static GSource * -g_io_win32_create_watch (GIOChannel *channel, - GIOCondition condition, - unsigned (__stdcall *thread) (void *parameter)) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - GIOWin32Watch *watch; - GSource *source; - - source = g_source_new (&win32_watch_funcs, sizeof (GIOWin32Watch)); - watch = (GIOWin32Watch *)source; - - watch->channel = channel; - g_io_channel_ref (channel); - - watch->condition = condition; - - if (win32_channel->data_avail_event == NULL) - create_events (win32_channel); - - watch->pollfd.fd = (gint) win32_channel->data_avail_event; - watch->pollfd.events = condition; - - if (win32_channel->debug) - g_print ("g_io_win32_create_watch: fd:%d condition:%#x handle:%#x\n", - win32_channel->fd, condition, watch->pollfd.fd); - - win32_channel->watches = g_slist_append (win32_channel->watches, watch); - - if (win32_channel->thread_id == 0) - create_thread (win32_channel, condition, thread); - - g_source_add_poll (source, &watch->pollfd); - - return source; -} - -static GIOError -g_io_win32_msg_read (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_read) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - MSG msg; /* In case of alignment problems */ - - if (count < sizeof (MSG)) - return G_IO_ERROR_INVAL; - - if (win32_channel->debug) - g_print ("g_io_win32_msg_read: for %#x\n", - win32_channel->hwnd); - if (!PeekMessage (&msg, win32_channel->hwnd, 0, 0, PM_REMOVE)) - return G_IO_ERROR_AGAIN; - - memmove (buf, &msg, sizeof (MSG)); - *bytes_read = sizeof (MSG); - return G_IO_ERROR_NONE; -} - -static GIOError -g_io_win32_msg_write (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - MSG msg; - - if (count != sizeof (MSG)) - return G_IO_ERROR_INVAL; - - /* In case of alignment problems */ - memmove (&msg, buf, sizeof (MSG)); - if (!PostMessage (win32_channel->hwnd, msg.message, msg.wParam, msg.lParam)) - return G_IO_ERROR_UNKNOWN; - - *bytes_written = sizeof (MSG); - return G_IO_ERROR_NONE; -} - -static GIOError -g_io_win32_no_seek (GIOChannel *channel, - gint offset, - GSeekType type) -{ - return G_IO_ERROR_UNKNOWN; -} - -static void -g_io_win32_msg_close (GIOChannel *channel) -{ - /* Nothing to be done. Or should we set hwnd to some invalid value? */ -} - -static void -g_io_win32_free (GIOChannel *channel) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - - if (win32_channel->debug) - g_print ("thread %#x: freeing channel, fd: %d\n", - win32_channel->thread_id, - win32_channel->fd); - - if (win32_channel->data_avail_event) - CloseHandle (win32_channel->data_avail_event); - if (win32_channel->space_avail_event) - CloseHandle (win32_channel->space_avail_event); - if (win32_channel->data_avail_noticed_event) - CloseHandle (win32_channel->data_avail_noticed_event); - DeleteCriticalSection (&win32_channel->mutex); - - g_free (win32_channel->buffer); - g_slist_free (win32_channel->watches); - g_free (win32_channel); -} - -static GSource * -g_io_win32_msg_create_watch (GIOChannel *channel, - GIOCondition condition) -{ - GIOWin32Watch *watch; - GSource *source; - - source = g_source_new (&win32_watch_funcs, sizeof (GIOWin32Watch)); - watch = (GIOWin32Watch *)source; - - watch->channel = channel; - g_io_channel_ref (channel); - - watch->condition = condition; - - watch->pollfd.fd = G_WIN32_MSG_HANDLE; - watch->pollfd.events = condition; - - g_source_add_poll (source, &watch->pollfd); - - return source; -} - -static GIOError -g_io_win32_fd_read (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_read) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - gint result; - GIOError error; - - if (win32_channel->debug) - g_print ("g_io_win32_fd_read: fd:%d count:%d\n", - win32_channel->fd, count); - - if (win32_channel->thread_id) - { - result = buffer_read (win32_channel, buf, count, &error); - if (result < 0) - { - *bytes_read = 0; - return error; - } - else - { - *bytes_read = result; - return G_IO_ERROR_NONE; - } - } - - result = read (win32_channel->fd, buf, count); - - if (result < 0) - { - *bytes_read = 0; - if (errno == EINVAL) - return G_IO_ERROR_INVAL; - else - return G_IO_ERROR_UNKNOWN; - } - else - { - *bytes_read = result; - return G_IO_ERROR_NONE; - } -} - -static GIOError -g_io_win32_fd_write (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - gint result; - - result = write (win32_channel->fd, buf, count); - if (win32_channel->debug) - g_print ("g_io_win32_fd_write: fd:%d count:%d = %d\n", - win32_channel->fd, count, result); - - if (result < 0) - { - *bytes_written = 0; - switch (errno) - { - case EINVAL: - return G_IO_ERROR_INVAL; - case EAGAIN: - return G_IO_ERROR_AGAIN; - default: - return G_IO_ERROR_UNKNOWN; - } - } - else - { - *bytes_written = result; - return G_IO_ERROR_NONE; - } -} - -static GIOError -g_io_win32_fd_seek (GIOChannel *channel, - gint offset, - GSeekType type) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - int whence; - off_t result; - - switch (type) - { - case G_SEEK_SET: - whence = SEEK_SET; - break; - case G_SEEK_CUR: - whence = SEEK_CUR; - break; - case G_SEEK_END: - whence = SEEK_END; - break; - default: - g_warning (G_STRLOC ": Unknown seek type %d", (int) type); - return G_IO_ERROR_UNKNOWN; - } - - result = lseek (win32_channel->fd, offset, whence); - - if (result < 0) - { - switch (errno) - { - case EINVAL: - return G_IO_ERROR_INVAL; - default: - return G_IO_ERROR_UNKNOWN; - } - } - else - return G_IO_ERROR_NONE; -} - -static void -g_io_win32_fd_close (GIOChannel *channel) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - - if (win32_channel->debug) - g_print ("thread %#x: closing fd %d\n", - win32_channel->thread_id, - win32_channel->fd); - LOCK (win32_channel->mutex); - if (win32_channel->running) - { - if (win32_channel->debug) - g_print ("thread %#x: running, marking fd %d for later close\n", - win32_channel->thread_id, win32_channel->fd); - win32_channel->running = FALSE; - win32_channel->needs_close = TRUE; - SetEvent (win32_channel->data_avail_event); - } - else - { - if (win32_channel->debug) - g_print ("closing fd %d\n", win32_channel->fd); - close (win32_channel->fd); - if (win32_channel->debug) - g_print ("closed fd %d, setting to -1\n", - win32_channel->fd); - win32_channel->fd = -1; - } - UNLOCK (win32_channel->mutex); -} - -static GSource * -g_io_win32_fd_create_watch (GIOChannel *channel, - GIOCondition condition) -{ - return g_io_win32_create_watch (channel, condition, read_thread); -} - -static GIOError -g_io_win32_sock_read (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_read) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - gint result; - GIOError error; - - if (win32_channel->debug) - g_print ("g_io_win32_sock_read: sockfd:%d count:%d\n", - win32_channel->fd, count); - - result = recv (win32_channel->fd, buf, count, 0); - - if (win32_channel->debug) - g_print ("g_io_win32_sock_read: recv:%d\n", result); - - if (result == SOCKET_ERROR) - { - *bytes_read = 0; - switch (WSAGetLastError ()) - { - case WSAEINVAL: - return G_IO_ERROR_INVAL; - case WSAEWOULDBLOCK: - case WSAEINTR: - return G_IO_ERROR_AGAIN; - default: - return G_IO_ERROR_UNKNOWN; - } - } - else - { - *bytes_read = result; - return G_IO_ERROR_NONE; - } -} - -static GIOError -g_io_win32_sock_write (GIOChannel *channel, - gchar *buf, - guint count, - guint *bytes_written) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - gint result; - - if (win32_channel->debug) - g_print ("g_io_win32_sock_write: sockfd:%d count:%d\n", - win32_channel->fd, count); - - result = send (win32_channel->fd, buf, count, 0); - - if (win32_channel->debug) - g_print ("g_io_win32_sock_write: send:%d\n", result); - - if (result == SOCKET_ERROR) - { - *bytes_written = 0; - switch (WSAGetLastError ()) - { - case WSAEINVAL: - return G_IO_ERROR_INVAL; - case WSAEWOULDBLOCK: - case WSAEINTR: - return G_IO_ERROR_AGAIN; - default: - return G_IO_ERROR_UNKNOWN; - } - } - else - { - *bytes_written = result; - return G_IO_ERROR_NONE; - } -} - -static void -g_io_win32_sock_close (GIOChannel *channel) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - - LOCK(win32_channel->mutex); - if (win32_channel->running) - { - if (win32_channel->debug) - g_print ("thread %#x: running, marking for later close\n", - win32_channel->thread_id); - win32_channel->running = FALSE; - win32_channel->needs_close = TRUE; - SetEvent(win32_channel->data_avail_noticed_event); - } - if (win32_channel->fd != -1) - { - if (win32_channel->debug) - g_print ("thread %#x: closing socket %d\n", - win32_channel->thread_id, - win32_channel->fd); - - closesocket (win32_channel->fd); - win32_channel->fd = -1; - } - UNLOCK(win32_channel->mutex); -} - -static GSource * -g_io_win32_sock_create_watch (GIOChannel *channel, - GIOCondition condition) -{ - return g_io_win32_create_watch (channel, condition, select_thread); -} - -static GIOFuncs win32_channel_msg_funcs = { - g_io_win32_msg_read, - g_io_win32_msg_write, - g_io_win32_no_seek, - g_io_win32_msg_close, - g_io_win32_msg_create_watch, - g_io_win32_free -}; - -static GIOFuncs win32_channel_fd_funcs = { - g_io_win32_fd_read, - g_io_win32_fd_write, - g_io_win32_fd_seek, - g_io_win32_fd_close, - g_io_win32_fd_create_watch, - g_io_win32_free -}; - -static GIOFuncs win32_channel_sock_funcs = { - g_io_win32_sock_read, - g_io_win32_sock_write, - g_io_win32_no_seek, - g_io_win32_sock_close, - g_io_win32_sock_create_watch, - g_io_win32_free -}; - -GIOChannel * -g_io_channel_win32_new_messages (guint hwnd) -{ - GIOWin32Channel *win32_channel = g_new (GIOWin32Channel, 1); - GIOChannel *channel = (GIOChannel *)win32_channel; - - g_io_channel_init (channel); - g_io_channel_win32_init (win32_channel); - if (win32_channel->debug) - g_print ("g_io_channel_win32_new_messages: hwnd = %ud\n", hwnd); - channel->funcs = &win32_channel_msg_funcs; - win32_channel->type = G_IO_WIN32_WINDOWS_MESSAGES; - win32_channel->hwnd = (HWND) hwnd; - - return channel; -} - -GIOChannel * -g_io_channel_win32_new_fd (gint fd) -{ - GIOWin32Channel *win32_channel; - GIOChannel *channel; - struct stat st; - - if (fstat (fd, &st) == -1) - { - g_warning (G_STRLOC ": %d isn't a (emulated) file descriptor", fd); - return NULL; - } - - win32_channel = g_new (GIOWin32Channel, 1); - channel = (GIOChannel *)win32_channel; - - g_io_channel_init (channel); - g_io_channel_win32_init (win32_channel); - if (win32_channel->debug) - g_print ("g_io_channel_win32_new_fd: fd = %d\n", fd); - channel->funcs = &win32_channel_fd_funcs; - win32_channel->type = G_IO_WIN32_FILE_DESC; - win32_channel->fd = fd; - - return channel; -} - -gint -g_io_channel_win32_get_fd (GIOChannel *channel) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - - return win32_channel->fd; -} - -GIOChannel * -g_io_channel_win32_new_socket (int socket) -{ - GIOWin32Channel *win32_channel = g_new (GIOWin32Channel, 1); - GIOChannel *channel = (GIOChannel *)win32_channel; - - g_io_channel_init (channel); - g_io_channel_win32_init (win32_channel); - if (win32_channel->debug) - g_print ("g_io_channel_win32_new_socket: sockfd:%d\n", socket); - channel->funcs = &win32_channel_sock_funcs; - win32_channel->type = G_IO_WIN32_SOCKET; - win32_channel->fd = socket; - - return channel; -} - -GIOChannel * -g_io_channel_unix_new (gint fd) -{ - struct stat st; - - if (fstat (fd, &st) == 0) - return g_io_channel_win32_new_fd (fd); - - if (getsockopt (fd, SOL_SOCKET, SO_TYPE, NULL, NULL) != SO_ERROR) - return g_io_channel_win32_new_socket(fd); - - g_warning (G_STRLOC ": %d is neither a file descriptor or a socket", fd); - return NULL; -} - -gint -g_io_channel_unix_get_fd (GIOChannel *channel) -{ - return g_io_channel_win32_get_fd (channel); -} - -void -g_io_channel_win32_set_debug (GIOChannel *channel, - gboolean flag) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - - win32_channel->debug = flag; -} - -gint -g_io_channel_win32_poll (GPollFD *fds, - gint n_fds, - gint timeout) -{ - int result; - - g_return_val_if_fail (n_fds >= 0, 0); - - result = (*g_main_context_get_poll_func (NULL)) (fds, n_fds, timeout); - - return result; -} - -void -g_io_channel_win32_make_pollfd (GIOChannel *channel, - GIOCondition condition, - GPollFD *fd) -{ - GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel; - - if (win32_channel->data_avail_event == NULL) - create_events (win32_channel); - - fd->fd = (gint) win32_channel->data_avail_event; - fd->events = condition; - - if (win32_channel->thread_id == 0) - if ((condition & G_IO_IN) && win32_channel->type == G_IO_WIN32_FILE_DESC) - create_thread (win32_channel, condition, read_thread); - else if (win32_channel->type == G_IO_WIN32_SOCKET) - create_thread (win32_channel, condition, select_thread); -} - -/* Binary compatibility */ -GIOChannel * -g_io_channel_win32_new_stream_socket (int socket) -{ - return g_io_channel_win32_new_socket (socket); -} diff --git a/glib-object.h b/glib-object.h deleted file mode 100644 index 98e3dfebc..000000000 --- a/glib-object.h +++ /dev/null @@ -1,38 +0,0 @@ -/* GObject - GLib Type, Object, Parameter and Signal Library - * Copyright (C) 1998, 1999, 2000 Tim Janik and Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __GLIB_GOBJECT_H__ -#define __GLIB_GOBJECT_H__ - -/* topmost include file for GObject header files */ -#include <gobject/gboxed.h> -#include <gobject/gbsearcharray.h> -#include <gobject/genums.h> -#include <gobject/gobject.h> -#include <gobject/gparam.h> -#include <gobject/gparamspecs.h> -#include <gobject/gsignal.h> -#include <gobject/gtype.h> -#include <gobject/gtypemodule.h> -#include <gobject/gtypeplugin.h> -#include <gobject/gvalue.h> -#include <gobject/gvaluearray.h> -#include <gobject/gvaluetypes.h> - - -#endif /* __GLIB_GOBJECT_H__ */ diff --git a/glib.h b/glib.h deleted file mode 100644 index 8b32accc9..000000000 --- a/glib.h +++ /dev/null @@ -1,75 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_LIB_H__ -#define __G_LIB_H__ - -#include <galloca.h> -#include <garray.h> -#include <gasyncqueue.h> -#include <gbacktrace.h> -#include <gcache.h> -#include <gcompletion.h> -#include <gconvert.h> -#include <gdataset.h> -#include <gdate.h> -#include <gerror.h> -#include <gfileutils.h> -#include <ghash.h> -#include <ghook.h> -#include <giochannel.h> -#include <glist.h> -#include <gmacros.h> -#include <gmain.h> -#include <gmarkup.h> -#include <gmem.h> -#include <gmessages.h> -#include <gnode.h> -#include <gpattern.h> -#include <gprimes.h> -#include <gqsort.h> -#include <gquark.h> -#include <gqueue.h> -#include <grand.h> -#include <grel.h> -#include <gscanner.h> -#include <gshell.h> -#include <gslist.h> -#include <gspawn.h> -#include <gstrfuncs.h> -#include <gstring.h> -#include <gthread.h> -#include <gthreadpool.h> -#include <gtimer.h> -#include <gtree.h> -#include <gtypes.h> -#include <gunicode.h> -#include <gutils.h> -#ifdef G_PLATFORM_WIN32 -#include <gwin32.h> -#endif - -#endif /* __G_LIB_H__ */ diff --git a/glib/.cvsignore b/glib/.cvsignore new file mode 100644 index 000000000..b26fb902a --- /dev/null +++ b/glib/.cvsignore @@ -0,0 +1,10 @@ +Makefile +Makefile.in +libglib-1.3.la +*.lo +*.obj +*.lib +*.dll +*.exe +.deps +.libs diff --git a/glib/Makefile.am b/glib/Makefile.am index 11b4e82d0..c25590043 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -1,46 +1,11 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = 1.4 - -SUBDIRS = . m4macros gobject gmodule gthread docs tests build - INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \ -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION EXTRA_DIST = \ - ChangeLog.pre-1-2 \ - glib.spec.in \ - NEWS.pre-1-3 \ - acglib.m4 \ - sanity_check \ - README.win32 \ - TODO.xml \ - glib.def \ - makefile.msc.in \ - makefile.mingw.in \ - glibconfig.h.win32.in \ - config.h.win32.in \ - build-dll \ - glib.rc.in \ - glib-2.0.pc.in \ - gobject-2.0.pc.in \ - gmodule-2.0.pc.in \ - gthread-2.0.pc.in \ - glib-2.0-uninstalled.pc.in \ - gobject-2.0-uninstalled.pc.in \ - gmodule-2.0-uninstalled.pc.in \ - gthread-2.0-uninstalled.pc.in \ gen-unicode-tables.pl -# These may be in the builddir too -BUILT_EXTRA_DIST = \ - makefile.msc \ - makefile.mingw \ - glibconfig.h.win32 \ - config.h.win32 \ - glib.rc \ - glib.spec - lib_LTLIBRARIES = libglib-1.3.la libglib_1_3_la_SOURCES = \ @@ -97,6 +62,11 @@ EXTRA_libglib_1_3_la_SOURCES = \ glibincludedir=$(includedir)/glib-2.0 glibinclude_HEADERS = \ + glib-object.h \ + glib.h + +glibsubincludedir=$(includedir)/glib-2.0/glib +glibsubinclude_HEADERS = \ galloca.h \ garray.h \ gasyncqueue.h \ @@ -111,8 +81,6 @@ glibinclude_HEADERS = \ ghash.h \ ghook.h \ giochannel.h \ - glib.h \ - glib-object.h \ glist.h \ gmacros.h \ gmain.h \ @@ -142,24 +110,12 @@ glibinclude_HEADERS = \ gutils.h \ gwin32.h -configexecincludedir = $(libdir)/glib-2.0/include -#configexecinclude_DATA = glibconfig.h - -install-exec-local: glibconfig.h - $(mkinstalldirs) $(DESTDIR)$(configexecincludedir) - file=$(DESTDIR)$(configexecincludedir)/glibconfig.h; \ - if test -r $$file && cmp -s glibconfig.h $$file; then :; \ - else $(INSTALL_DATA) glibconfig.h $$file; fi - -CONFIGURE_DEPENDENCIES = acglib.m4 - -BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h -glibconfig.h: stamp-gc-h - @if test -f glibconfig.h; then :; \ - else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi -stamp-gc-h: config.status - CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status - echo timestamp > stamp-gc-h +install-data-local: + @if test -f $(glibincludedir)/glist.h ; then \ + echo "*** Old headers found in $(glibincludedir). You should remove the" ; \ + echo "*** contents of this directory and type 'make install' again." ; \ + false ; \ + fi libglib_1_3_la_LIBADD = @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ libglib_1_3_la_DEPENDENCIES = @GIO@ @GSPAWN@ @PLATFORMDEP@ @@ -181,63 +137,4 @@ if OS_WIN32 bin_PROGRAMS = gspawn-win32-helper gspawn_win32_helper_LDADD = libglib-1.3.la endif -if ENABLE_TIMELOOP -timeloop = timeloop -endif -noinst_PROGRAMS = testglib testgdate testgdateparser $(timeloop) -testglib_LDADD = libglib-1.3.la -testgdate_LDADD = libglib-1.3.la -testgdateparser_LDADD = libglib-1.3.la -if ENABLE_TIMELOOP -timeloop_LDADD = libglib-1.3.la -endif - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc - -glibconfig.h.win32: $(top_builddir)/config.status $(top_srcdir)/glibconfig.h.win32.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -bin_SCRIPTS=glib-config-2.0 -BUILT_SOURCES=glib-config-2.0 -glib-config-2.0: glib-config-2.0.in - -.PHONY: files release sanity snapshot - -files: - @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ - echo $$p; \ - done - -release: - rm -rf .deps */.deps - cd docs && make glib.html - $(MAKE) distcheck - -sanity: - ./sanity_check $(VERSION) - -snapshot: - $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"` - -snapcheck: - $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"` -dist-hook: $(BUILT_EXTRA_DIST) - cd $(top_builddir) && CONFIG_FILES="INSTALL README" CONFIG_HEADERS= $(SHELL) ./config.status - files='$(BUILT_EXTRA_DIST) INSTALL README'; \ - for f in $$files; do \ - if test -f $$f; then d=.; else d=$(srcdir); fi; \ - rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done diff --git a/glib/galloca.h b/glib/galloca.h index b4194d4ac..7bc0a5fa3 100644 --- a/glib/galloca.h +++ b/glib/galloca.h @@ -27,7 +27,7 @@ #ifndef __G_ALLOCA_H__ #define __G_ALLOCA_H__ -#include <gtypes.h> +#include <glib/gtypes.h> #ifdef __GNUC__ /* GCC does the right thing */ diff --git a/glib/garray.h b/glib/garray.h index 766da77d6..56b3937fe 100644 --- a/glib/garray.h +++ b/glib/garray.h @@ -27,7 +27,7 @@ #ifndef __G_ARRAY_H__ #define __G_ARRAY_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gasyncqueue.h b/glib/gasyncqueue.h index 6e87425f7..0f1a80db9 100644 --- a/glib/gasyncqueue.h +++ b/glib/gasyncqueue.h @@ -27,7 +27,7 @@ #ifndef __G_ASYNCQUEUE_H__ #define __G_ASYNCQUEUE_H__ -#include <gthread.h> +#include <glib/gthread.h> G_BEGIN_DECLS diff --git a/glib/gbacktrace.h b/glib/gbacktrace.h index 25d2f9987..93b51749c 100644 --- a/glib/gbacktrace.h +++ b/glib/gbacktrace.h @@ -27,7 +27,7 @@ #ifndef __G_BACKTRACE_H__ #define __G_BACKTRACE_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gcache.h b/glib/gcache.h index 74ef5b654..a9128b653 100644 --- a/glib/gcache.h +++ b/glib/gcache.h @@ -27,7 +27,7 @@ #ifndef __G_CACHE_H__ #define __G_CACHE_H__ -#include <glist.h> +#include <glib/glist.h> G_BEGIN_DECLS diff --git a/glib/gcompletion.h b/glib/gcompletion.h index 3aade5322..eab0699b5 100644 --- a/glib/gcompletion.h +++ b/glib/gcompletion.h @@ -27,7 +27,7 @@ #ifndef __G_COMPLETION_H__ #define __G_COMPLETION_H__ -#include <glist.h> +#include <glib/glist.h> G_BEGIN_DECLS diff --git a/glib/gconvert.h b/glib/gconvert.h index 3166bfa0f..63e083531 100644 --- a/glib/gconvert.h +++ b/glib/gconvert.h @@ -28,7 +28,7 @@ #define __G_CONVERT_H__ #include <stddef.h> /* For size_t */ -#include <gerror.h> +#include <glib/gerror.h> G_BEGIN_DECLS diff --git a/glib/gdataset.h b/glib/gdataset.h index f9d15b308..e04a706c1 100644 --- a/glib/gdataset.h +++ b/glib/gdataset.h @@ -27,7 +27,7 @@ #ifndef __G_DATASET_H__ #define __G_DATASET_H__ -#include <gquark.h> +#include <glib/gquark.h> G_BEGIN_DECLS diff --git a/glib/gdate.h b/glib/gdate.h index 4cbdd8c0d..96d827f66 100644 --- a/glib/gdate.h +++ b/glib/gdate.h @@ -27,7 +27,7 @@ #ifndef __G_DATE_H__ #define __G_DATE_H__ -#include <gquark.h> +#include <glib/gquark.h> G_BEGIN_DECLS diff --git a/glib/gerror.h b/glib/gerror.h index a7eb8fdab..ea0d25aaf 100644 --- a/glib/gerror.h +++ b/glib/gerror.h @@ -21,7 +21,7 @@ #ifndef __G_ERROR_H__ #define __G_ERROR_H__ -#include <gquark.h> +#include <glib/gquark.h> G_BEGIN_DECLS diff --git a/glib/gfileutils.h b/glib/gfileutils.h index 717fa63ec..161a131ae 100644 --- a/glib/gfileutils.h +++ b/glib/gfileutils.h @@ -21,7 +21,7 @@ #ifndef __G_FILEUTILS_H__ #define __G_FILEUTILS_H__ -#include <gerror.h> +#include <glib/gerror.h> G_BEGIN_DECLS diff --git a/glib/ghash.h b/glib/ghash.h index a9af5dc71..acc2d176e 100644 --- a/glib/ghash.h +++ b/glib/ghash.h @@ -27,7 +27,7 @@ #ifndef __G_HASH_H__ #define __G_HASH_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/ghook.h b/glib/ghook.h index 8942e5ada..e6bfb4614 100644 --- a/glib/ghook.h +++ b/glib/ghook.h @@ -27,7 +27,7 @@ #ifndef __G_HOOK_H__ #define __G_HOOK_H__ -#include <gmem.h> +#include <glib/gmem.h> G_BEGIN_DECLS diff --git a/glib/giochannel.h b/glib/giochannel.h index ed9c7c8c0..51b870a7b 100644 --- a/glib/giochannel.h +++ b/glib/giochannel.h @@ -27,8 +27,8 @@ #ifndef __G_IOCHANNEL_H__ #define __G_IOCHANNEL_H__ -#include <gmain.h> -#include <gtypes.h> +#include <glib/gmain.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/glib.h b/glib/glib.h index 8b32accc9..0febae39e 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -27,49 +27,49 @@ #ifndef __G_LIB_H__ #define __G_LIB_H__ -#include <galloca.h> -#include <garray.h> -#include <gasyncqueue.h> -#include <gbacktrace.h> -#include <gcache.h> -#include <gcompletion.h> -#include <gconvert.h> -#include <gdataset.h> -#include <gdate.h> -#include <gerror.h> -#include <gfileutils.h> -#include <ghash.h> -#include <ghook.h> -#include <giochannel.h> -#include <glist.h> -#include <gmacros.h> -#include <gmain.h> -#include <gmarkup.h> -#include <gmem.h> -#include <gmessages.h> -#include <gnode.h> -#include <gpattern.h> -#include <gprimes.h> -#include <gqsort.h> -#include <gquark.h> -#include <gqueue.h> -#include <grand.h> -#include <grel.h> -#include <gscanner.h> -#include <gshell.h> -#include <gslist.h> -#include <gspawn.h> -#include <gstrfuncs.h> -#include <gstring.h> -#include <gthread.h> -#include <gthreadpool.h> -#include <gtimer.h> -#include <gtree.h> -#include <gtypes.h> -#include <gunicode.h> -#include <gutils.h> +#include <glib/galloca.h> +#include <glib/garray.h> +#include <glib/gasyncqueue.h> +#include <glib/gbacktrace.h> +#include <glib/gcache.h> +#include <glib/gcompletion.h> +#include <glib/gconvert.h> +#include <glib/gdataset.h> +#include <glib/gdate.h> +#include <glib/gerror.h> +#include <glib/gfileutils.h> +#include <glib/ghash.h> +#include <glib/ghook.h> +#include <glib/giochannel.h> +#include <glib/glist.h> +#include <glib/gmacros.h> +#include <glib/gmain.h> +#include <glib/gmarkup.h> +#include <glib/gmem.h> +#include <glib/gmessages.h> +#include <glib/gnode.h> +#include <glib/gpattern.h> +#include <glib/gprimes.h> +#include <glib/gqsort.h> +#include <glib/gquark.h> +#include <glib/gqueue.h> +#include <glib/grand.h> +#include <glib/grel.h> +#include <glib/gscanner.h> +#include <glib/gshell.h> +#include <glib/gslist.h> +#include <glib/gspawn.h> +#include <glib/gstrfuncs.h> +#include <glib/gstring.h> +#include <glib/gthread.h> +#include <glib/gthreadpool.h> +#include <glib/gtimer.h> +#include <glib/gtree.h> +#include <glib/gtypes.h> +#include <glib/gunicode.h> +#include <glib/gutils.h> #ifdef G_PLATFORM_WIN32 -#include <gwin32.h> +#include <glib/gwin32.h> #endif #endif /* __G_LIB_H__ */ diff --git a/glib/glist.h b/glib/glist.h index 81ec9b3a2..bd165d417 100644 --- a/glib/glist.h +++ b/glib/glist.h @@ -27,7 +27,7 @@ #ifndef __G_LIST_H__ #define __G_LIST_H__ -#include <gmem.h> +#include <glib/gmem.h> G_BEGIN_DECLS diff --git a/glib/gmain.h b/glib/gmain.h index 70a64de1a..a8ce3e2a8 100644 --- a/glib/gmain.h +++ b/glib/gmain.h @@ -20,8 +20,8 @@ #ifndef __G_MAIN_H__ #define __G_MAIN_H__ -#include <gslist.h> -#include <gthread.h> +#include <glib/gslist.h> +#include <glib/gthread.h> G_BEGIN_DECLS diff --git a/glib/gmarkup.h b/glib/gmarkup.h index 32de22c2c..3fba0d677 100644 --- a/glib/gmarkup.h +++ b/glib/gmarkup.h @@ -21,7 +21,7 @@ #ifndef __G_MARKUP_H__ #define __G_MARKUP_H__ -#include <gerror.h> +#include <glib/gerror.h> G_BEGIN_DECLS diff --git a/glib/gmem.h b/glib/gmem.h index 014326c6b..392a06cda 100644 --- a/glib/gmem.h +++ b/glib/gmem.h @@ -27,7 +27,7 @@ #ifndef __G_MEM_H__ #define __G_MEM_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gmessages.h b/glib/gmessages.h index 5657604c7..b937b4950 100644 --- a/glib/gmessages.h +++ b/glib/gmessages.h @@ -28,7 +28,7 @@ #define __G_MESSAGES_H__ #include <stdarg.h> -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gnode.h b/glib/gnode.h index c4a9c5f69..6d79ab0a4 100644 --- a/glib/gnode.h +++ b/glib/gnode.h @@ -27,7 +27,7 @@ #ifndef __G_NODE_H__ #define __G_NODE_H__ -#include <gmem.h> +#include <glib/gmem.h> G_BEGIN_DECLS diff --git a/glib/gpattern.h b/glib/gpattern.h index add239c6c..bd29ad7ac 100644 --- a/glib/gpattern.h +++ b/glib/gpattern.h @@ -19,7 +19,7 @@ #ifndef __G_PATTERN_H__ #define __G_PATTERN_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gprimes.h b/glib/gprimes.h index daa1598c2..0f1740cb1 100644 --- a/glib/gprimes.h +++ b/glib/gprimes.h @@ -27,7 +27,7 @@ #ifndef __G_PRIMES_H__ #define __G_PRIMES_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gqsort.h b/glib/gqsort.h index d946e80ca..12e7a05b1 100644 --- a/glib/gqsort.h +++ b/glib/gqsort.h @@ -28,7 +28,7 @@ #ifndef __G_QSORT_H__ #define __G_QSORT_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gquark.h b/glib/gquark.h index e8756ef61..6b96dcf64 100644 --- a/glib/gquark.h +++ b/glib/gquark.h @@ -27,7 +27,7 @@ #ifndef __G_QUARK_H__ #define __G_QUARK_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gqueue.h b/glib/gqueue.h index b71b6d61e..64fd69282 100644 --- a/glib/gqueue.h +++ b/glib/gqueue.h @@ -27,7 +27,7 @@ #ifndef __G_QUEUE_H__ #define __G_QUEUE_H__ -#include <glist.h> +#include <glib/glist.h> G_BEGIN_DECLS diff --git a/glib/grand.h b/glib/grand.h index 5accc1ae1..d743953f9 100644 --- a/glib/grand.h +++ b/glib/grand.h @@ -27,7 +27,7 @@ #ifndef __G_RAND_H__ #define __G_RAND_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/grel.h b/glib/grel.h index fcf8eab45..562bd1360 100644 --- a/glib/grel.h +++ b/glib/grel.h @@ -27,7 +27,7 @@ #ifndef __G_REL_H__ #define __G_REL_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gscanner.h b/glib/gscanner.h index d71bbdea5..cbcc48c27 100644 --- a/glib/gscanner.h +++ b/glib/gscanner.h @@ -27,7 +27,7 @@ #ifndef __G_SCANNER_H__ #define __G_SCANNER_H__ -#include <ghash.h> +#include <glib/ghash.h> G_BEGIN_DECLS diff --git a/glib/gshell.h b/glib/gshell.h index c433cbaeb..b3f9d9148 100644 --- a/glib/gshell.h +++ b/glib/gshell.h @@ -21,7 +21,7 @@ #ifndef __G_SHELL_H__ #define __G_SHELL_H__ -#include <gerror.h> +#include <glib/gerror.h> G_BEGIN_DECLS diff --git a/glib/gslist.h b/glib/gslist.h index 00d3fc336..32a3b2452 100644 --- a/glib/gslist.h +++ b/glib/gslist.h @@ -27,7 +27,7 @@ #ifndef __G_SLIST_H__ #define __G_SLIST_H__ -#include <gmem.h> +#include <glib/gmem.h> G_BEGIN_DECLS diff --git a/glib/gspawn.h b/glib/gspawn.h index dcebc3a8b..795bb3ce6 100644 --- a/glib/gspawn.h +++ b/glib/gspawn.h @@ -21,7 +21,7 @@ #ifndef __G_SPAWN_H__ #define __G_SPAWN_H__ -#include <gerror.h> +#include <glib/gerror.h> G_BEGIN_DECLS diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h index 1c6ba9bda..628b3b166 100644 --- a/glib/gstrfuncs.h +++ b/glib/gstrfuncs.h @@ -28,7 +28,7 @@ #define __G_STRFUNCS_H__ #include <stdarg.h> -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gstring.h b/glib/gstring.h index 6c2360db9..ed01fa95e 100644 --- a/glib/gstring.h +++ b/glib/gstring.h @@ -27,7 +27,7 @@ #ifndef __G_STRING_H__ #define __G_STRING_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gthread.h b/glib/gthread.h index 4656270b9..58043bf06 100644 --- a/glib/gthread.h +++ b/glib/gthread.h @@ -27,8 +27,8 @@ #ifndef __G_THREAD_H__ #define __G_THREAD_H__ -#include <gerror.h> -#include <gtypes.h> +#include <glib/gerror.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gthreadpool.h b/glib/gthreadpool.h index d2c54fb00..ed1e81ba3 100644 --- a/glib/gthreadpool.h +++ b/glib/gthreadpool.h @@ -27,7 +27,7 @@ #ifndef __G_THREADPOOL_H__ #define __G_THREADPOOL_H__ -#include <gthread.h> +#include <glib/gthread.h> G_BEGIN_DECLS diff --git a/glib/gtimer.h b/glib/gtimer.h index 823d63442..3a9b26506 100644 --- a/glib/gtimer.h +++ b/glib/gtimer.h @@ -27,7 +27,7 @@ #ifndef __G_TIMER_H__ #define __G_TIMER_H__ -#include <gtypes.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gtree.h b/glib/gtree.h index 401120bbc..6742c4a19 100644 --- a/glib/gtree.h +++ b/glib/gtree.h @@ -27,7 +27,7 @@ #ifndef __G_TREE_H__ #define __G_TREE_H__ -#include <gnode.h> +#include <glib/gnode.h> G_BEGIN_DECLS diff --git a/glib/gunicode.h b/glib/gunicode.h index 2136005ae..c139781c8 100644 --- a/glib/gunicode.h +++ b/glib/gunicode.h @@ -22,8 +22,8 @@ #ifndef __G_UNICODE_H__ #define __G_UNICODE_H__ -#include <gerror.h> -#include <gtypes.h> +#include <glib/gerror.h> +#include <glib/gtypes.h> G_BEGIN_DECLS diff --git a/glib/gutils.h b/glib/gutils.h index 3e3d30fe4..65929e6c2 100644 --- a/glib/gutils.h +++ b/glib/gutils.h @@ -27,7 +27,7 @@ #ifndef __G_UTILS_H__ #define __G_UTILS_H__ -#include <gtypes.h> +#include <glib/gtypes.h> #include <stdarg.h> G_BEGIN_DECLS diff --git a/glib/gwin32.h b/glib/gwin32.h index d3592490a..a71d77448 100644 --- a/glib/gwin32.h +++ b/glib/gwin32.h @@ -27,7 +27,7 @@ #ifndef __G_WIN32_H__ #define __G_WIN32_H__ -#include <gtypes.h> +#include <glib/gtypes.h> #ifdef G_PLATFORM_WIN32 diff --git a/glibintl.h b/glibintl.h deleted file mode 100644 index c7a1b6acc..000000000 --- a/glibintl.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __GLIBINTL_H__ -#define __GLIBINTL_H__ - -#include "config.h" - -#ifdef ENABLE_NLS - -gchar *_glib_gettext (const gchar *str); - -#include <libintl.h> -#define _(String) _glib_gettext(String) - -#ifdef gettext_noop -#define N_(String) gettext_noop(String) -#else -#define N_(String) (String) -#endif -#else /* NLS is disabled */ -#define _(String) (String) -#define N_(String) (String) -#define textdomain(String) (String) -#define gettext(String) (String) -#define dgettext(Domain,String) (String) -#define dcgettext(Domain,String,Type) (String) -#define bindtextdomain(Domain,Directory) (Domain) -#endif - -#endif /* __GLIBINTL_H__ */ diff --git a/glist.c b/glist.c deleted file mode 100644 index 7c59697c9..000000000 --- a/glist.c +++ /dev/null @@ -1,826 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glib.h" - - -#ifndef DISABLE_MEM_POOLS -struct _GAllocator /* from gmem.c */ -{ - gchar *name; - guint16 n_preallocs; - guint is_unused : 1; - guint type : 4; - GAllocator *last; - GMemChunk *mem_chunk; - GList *free_lists; /* implementation specific */ -}; - -static GAllocator *current_allocator = NULL; -G_LOCK_DEFINE_STATIC (current_allocator); - -/* HOLDS: current_allocator_lock */ -static void -g_list_validate_allocator (GAllocator *allocator) -{ - g_return_if_fail (allocator != NULL); - g_return_if_fail (allocator->is_unused == TRUE); - - if (allocator->type != G_ALLOCATOR_LIST) - { - allocator->type = G_ALLOCATOR_LIST; - if (allocator->mem_chunk) - { - g_mem_chunk_destroy (allocator->mem_chunk); - allocator->mem_chunk = NULL; - } - } - - if (!allocator->mem_chunk) - { - allocator->mem_chunk = g_mem_chunk_new (allocator->name, - sizeof (GList), - sizeof (GList) * allocator->n_preallocs, - G_ALLOC_ONLY); - allocator->free_lists = NULL; - } - - allocator->is_unused = FALSE; -} - -void -g_list_push_allocator(GAllocator *allocator) -{ - G_LOCK (current_allocator); - g_list_validate_allocator (allocator); - allocator->last = current_allocator; - current_allocator = allocator; - G_UNLOCK (current_allocator); -} - -void -g_list_pop_allocator (void) -{ - G_LOCK (current_allocator); - if (current_allocator) - { - GAllocator *allocator; - - allocator = current_allocator; - current_allocator = allocator->last; - allocator->last = NULL; - allocator->is_unused = TRUE; - } - G_UNLOCK (current_allocator); -} - -static inline GList* -_g_list_alloc (void) -{ - GList *list; - - G_LOCK (current_allocator); - if (!current_allocator) - { - GAllocator *allocator = g_allocator_new ("GLib default GList allocator", - 128); - g_list_validate_allocator (allocator); - allocator->last = NULL; - current_allocator = allocator; - } - if (!current_allocator->free_lists) - { - list = g_chunk_new (GList, current_allocator->mem_chunk); - list->data = NULL; - } - else - { - if (current_allocator->free_lists->data) - { - list = current_allocator->free_lists->data; - current_allocator->free_lists->data = list->next; - list->data = NULL; - } - else - { - list = current_allocator->free_lists; - current_allocator->free_lists = list->next; - } - } - G_UNLOCK (current_allocator); - list->next = NULL; - list->prev = NULL; - - return list; -} - -GList* -g_list_alloc (void) -{ - return _g_list_alloc (); -} - -void -g_list_free (GList *list) -{ - if (list) - { - GList *last_node = list; - -#ifdef ENABLE_GC_FRIENDLY - while (last_node->next) - { - last_node->data = NULL; - last_node->prev = NULL; - last_node = last_node->next; - } - last_node->data = NULL; - last_node->prev = NULL; -#else /* !ENABLE_GC_FRIENDLY */ - list->data = list->next; -#endif /* ENABLE_GC_FRIENDLY */ - - G_LOCK (current_allocator); - last_node->next = current_allocator->free_lists; - current_allocator->free_lists = list; - G_UNLOCK (current_allocator); - } -} - -static inline void -_g_list_free_1 (GList *list) -{ - if (list) - { - list->data = NULL; - -#ifdef ENABLE_GC_FRIENDLY - list->prev = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - G_LOCK (current_allocator); - list->next = current_allocator->free_lists; - current_allocator->free_lists = list; - G_UNLOCK (current_allocator); - } -} - -void -g_list_free_1 (GList *list) -{ - _g_list_free_1 (list); -} - -#else /* DISABLE_MEM_POOLS */ - -#define _g_list_alloc g_list_alloc -GList* -g_list_alloc (void) -{ - GList *list; - - list = g_new0 (GList, 1); - - return list; -} - -void -g_list_free (GList *list) -{ - GList *last; - - while (list) - { - last = list; - list = list->next; - g_free (last); - } -} - -#define _g_list_free_1 g_list_free_1 -void -g_list_free_1 (GList *list) -{ - g_free (list); -} - -#endif - -GList* -g_list_append (GList *list, - gpointer data) -{ - GList *new_list; - GList *last; - - new_list = _g_list_alloc (); - new_list->data = data; - - if (list) - { - last = g_list_last (list); - /* g_assert (last != NULL); */ - last->next = new_list; - new_list->prev = last; - - return list; - } - else - return new_list; -} - -GList* -g_list_prepend (GList *list, - gpointer data) -{ - GList *new_list; - - new_list = _g_list_alloc (); - new_list->data = data; - - if (list) - { - if (list->prev) - { - list->prev->next = new_list; - new_list->prev = list->prev; - } - list->prev = new_list; - new_list->next = list; - } - - return new_list; -} - -GList* -g_list_insert (GList *list, - gpointer data, - gint position) -{ - GList *new_list; - GList *tmp_list; - - if (position < 0) - return g_list_append (list, data); - else if (position == 0) - return g_list_prepend (list, data); - - tmp_list = g_list_nth (list, position); - if (!tmp_list) - return g_list_append (list, data); - - new_list = _g_list_alloc (); - new_list->data = data; - - if (tmp_list->prev) - { - tmp_list->prev->next = new_list; - new_list->prev = tmp_list->prev; - } - new_list->next = tmp_list; - tmp_list->prev = new_list; - - if (tmp_list == list) - return new_list; - else - return list; -} - -GList * -g_list_concat (GList *list1, GList *list2) -{ - GList *tmp_list; - - if (list2) - { - tmp_list = g_list_last (list1); - if (tmp_list) - tmp_list->next = list2; - else - list1 = list2; - list2->prev = tmp_list; - } - - return list1; -} - -GList* -g_list_remove (GList *list, - gconstpointer data) -{ - GList *tmp; - - tmp = list; - while (tmp) - { - if (tmp->data != data) - tmp = tmp->next; - else - { - if (tmp->prev) - tmp->prev->next = tmp->next; - if (tmp->next) - tmp->next->prev = tmp->prev; - - if (list == tmp) - list = list->next; - - _g_list_free_1 (tmp); - - break; - } - } - return list; -} - -GList* -g_list_remove_all (GList *list, - gconstpointer data) -{ - GList *tmp = list; - - while (tmp) - { - if (tmp->data != data) - tmp = tmp->next; - else - { - GList *next = tmp->next; - - if (tmp->prev) - tmp->prev->next = next; - else - list = next; - if (next) - next->prev = tmp->prev; - - _g_list_free_1 (tmp); - tmp = next; - } - } - return list; -} - -static inline GList* -_g_list_remove_link (GList *list, - GList *link) -{ - if (link) - { - if (link->prev) - link->prev->next = link->next; - if (link->next) - link->next->prev = link->prev; - - if (link == list) - list = list->next; - - link->next = NULL; - link->prev = NULL; - } - - return list; -} - -GList* -g_list_remove_link (GList *list, - GList *link) -{ - return _g_list_remove_link (list, link); -} - -GList* -g_list_delete_link (GList *list, - GList *link) -{ - list = _g_list_remove_link (list, link); - _g_list_free_1 (link); - - return list; -} - -GList* -g_list_copy (GList *list) -{ - GList *new_list = NULL; - - if (list) - { - GList *last; - - new_list = _g_list_alloc (); - new_list->data = list->data; - last = new_list; - list = list->next; - while (list) - { - last->next = _g_list_alloc (); - last->next->prev = last; - last = last->next; - last->data = list->data; - list = list->next; - } - } - - return new_list; -} - -GList* -g_list_reverse (GList *list) -{ - GList *last; - - last = NULL; - while (list) - { - last = list; - list = last->next; - last->next = last->prev; - last->prev = list; - } - - return last; -} - -GList* -g_list_nth (GList *list, - guint n) -{ - while ((n-- > 0) && list) - list = list->next; - - return list; -} - -GList* -g_list_nth_prev (GList *list, - guint n) -{ - while ((n-- > 0) && list) - list = list->prev; - - return list; -} - -gpointer -g_list_nth_data (GList *list, - guint n) -{ - while ((n-- > 0) && list) - list = list->next; - - return list ? list->data : NULL; -} - -GList* -g_list_find (GList *list, - gconstpointer data) -{ - while (list) - { - if (list->data == data) - break; - list = list->next; - } - - return list; -} - -GList* -g_list_find_custom (GList *list, - gconstpointer data, - GCompareFunc func) -{ - g_return_val_if_fail (func != NULL, list); - - while (list) - { - if (! func (list->data, data)) - return list; - list = list->next; - } - - return NULL; -} - - -gint -g_list_position (GList *list, - GList *link) -{ - gint i; - - i = 0; - while (list) - { - if (list == link) - return i; - i++; - list = list->next; - } - - return -1; -} - -gint -g_list_index (GList *list, - gconstpointer data) -{ - gint i; - - i = 0; - while (list) - { - if (list->data == data) - return i; - i++; - list = list->next; - } - - return -1; -} - -GList* -g_list_last (GList *list) -{ - if (list) - { - while (list->next) - list = list->next; - } - - return list; -} - -GList* -g_list_first (GList *list) -{ - if (list) - { - while (list->prev) - list = list->prev; - } - - return list; -} - -guint -g_list_length (GList *list) -{ - guint length; - - length = 0; - while (list) - { - length++; - list = list->next; - } - - return length; -} - -void -g_list_foreach (GList *list, - GFunc func, - gpointer user_data) -{ - while (list) - { - GList *next = list->next; - (*func) (list->data, user_data); - list = next; - } -} - - -GList* -g_list_insert_sorted (GList *list, - gpointer data, - GCompareFunc func) -{ - GList *tmp_list = list; - GList *new_list; - gint cmp; - - g_return_val_if_fail (func != NULL, list); - - if (!list) - { - new_list = _g_list_alloc (); - new_list->data = data; - return new_list; - } - - cmp = (*func) (data, tmp_list->data); - - while ((tmp_list->next) && (cmp > 0)) - { - tmp_list = tmp_list->next; - cmp = (*func) (data, tmp_list->data); - } - - new_list = _g_list_alloc (); - new_list->data = data; - - if ((!tmp_list->next) && (cmp > 0)) - { - tmp_list->next = new_list; - new_list->prev = tmp_list; - return list; - } - - if (tmp_list->prev) - { - tmp_list->prev->next = new_list; - new_list->prev = tmp_list->prev; - } - new_list->next = tmp_list; - tmp_list->prev = new_list; - - if (tmp_list == list) - return new_list; - else - return list; -} - -static GList * -g_list_sort_merge (GList *l1, - GList *l2, - GFunc compare_func, - gboolean use_data, - gpointer user_data) -{ - GList list, *l, *lprev; - gint cmp; - - l = &list; - lprev = NULL; - - while (l1 && l2) - { - if (use_data) - cmp = ((GCompareDataFunc) compare_func) (l1->data, l2->data, user_data); - else - cmp = ((GCompareFunc) compare_func) (l1->data, l2->data); - - if (cmp <= 0) - { - l->next = l1; - l = l->next; - l->prev = lprev; - lprev = l; - l1 = l1->next; - } - else - { - l->next = l2; - l = l->next; - l->prev = lprev; - lprev = l; - l2 = l2->next; - } - } - l->next = l1 ? l1 : l2; - l->next->prev = l; - - return list.next; -} - -static GList* -g_list_sort_real (GList *list, - GFunc compare_func, - gboolean use_data, - gpointer user_data) -{ - GList *l1, *l2; - - if (!list) - return NULL; - if (!list->next) - return list; - - l1 = list; - l2 = list->next; - - while ((l2 = l2->next) != NULL) - { - if ((l2 = l2->next) == NULL) - break; - l1 = l1->next; - } - l2 = l1->next; - l1->next = NULL; - - return g_list_sort_merge (g_list_sort_real (list, compare_func, use_data, user_data), - g_list_sort_real (l2, compare_func, use_data, user_data), - compare_func, - use_data, - user_data); -} - -GList * -g_list_sort (GList *list, - GCompareFunc compare_func) -{ - return g_list_sort_real (list, (GFunc) compare_func, FALSE, NULL); - -} - -GList * -g_list_sort_with_data (GList *list, - GCompareDataFunc compare_func, - gpointer user_data) -{ - return g_list_sort_real (list, (GFunc) compare_func, TRUE, user_data); -} - -static GList* -g_list_sort2 (GList *list, - GCompareFunc compare_func) -{ - GSList *runs = NULL; - GList *tmp; - - /* Degenerate case. */ - if (!list) return NULL; - - /* Assume: list = [12,2,4,11,2,4,6,1,1,12]. */ - for (tmp = list; tmp; ) - { - GList *tmp2; - for (tmp2 = tmp; - tmp2->next && compare_func (tmp2->data, tmp2->next->data) <= 0; - tmp2 = tmp2->next) - /* Nothing */; - runs = g_slist_append (runs, tmp); - tmp = tmp2->next; - tmp2->next = NULL; - } - /* Now: runs = [[12],[2,4,11],[2,4,6],[1,1,12]]. */ - - while (runs->next) - { - /* We have more than one run. Merge pairwise. */ - GSList *dst, *src, *dstprev = NULL; - dst = src = runs; - while (src && src->next) - { - dst->data = g_list_sort_merge (src->data, - src->next->data, - (GFunc) compare_func, - FALSE, NULL); - dstprev = dst; - dst = dst->next; - src = src->next->next; - } - - /* If number of runs was odd, just keep the last. */ - if (src) - { - dst->data = src->data; - dstprev = dst; - dst = dst->next; - } - - dstprev->next = NULL; - g_slist_free (dst); - } - - /* After 1st loop: runs = [[2,4,11,12],[1,1,2,4,6,12]]. */ - /* After 2nd loop: runs = [[1,1,2,2,4,4,6,11,12,12]]. */ - - list = runs->data; - g_slist_free (runs); - return list; -} diff --git a/glist.h b/glist.h deleted file mode 100644 index 81ec9b3a2..000000000 --- a/glist.h +++ /dev/null @@ -1,105 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_LIST_H__ -#define __G_LIST_H__ - -#include <gmem.h> - -G_BEGIN_DECLS - -typedef struct _GList GList; - -struct _GList -{ - gpointer data; - GList *next; - GList *prev; -}; - -/* Doubly linked lists - */ -void g_list_push_allocator (GAllocator *allocator); -void g_list_pop_allocator (void); -GList* g_list_alloc (void); -void g_list_free (GList *list); -void g_list_free_1 (GList *list); -GList* g_list_append (GList *list, - gpointer data); -GList* g_list_prepend (GList *list, - gpointer data); -GList* g_list_insert (GList *list, - gpointer data, - gint position); -GList* g_list_insert_sorted (GList *list, - gpointer data, - GCompareFunc func); -GList* g_list_concat (GList *list1, - GList *list2); -GList* g_list_remove (GList *list, - gconstpointer data); -GList* g_list_remove_all (GList *list, - gconstpointer data); -GList* g_list_remove_link (GList *list, - GList *llink); -GList* g_list_delete_link (GList *list, - GList *link); -GList* g_list_reverse (GList *list); -GList* g_list_copy (GList *list); -GList* g_list_nth (GList *list, - guint n); -GList* g_list_nth_prev (GList *list, - guint n); -GList* g_list_find (GList *list, - gconstpointer data); -GList* g_list_find_custom (GList *list, - gconstpointer data, - GCompareFunc func); -gint g_list_position (GList *list, - GList *llink); -gint g_list_index (GList *list, - gconstpointer data); -GList* g_list_last (GList *list); -GList* g_list_first (GList *list); -guint g_list_length (GList *list); -void g_list_foreach (GList *list, - GFunc func, - gpointer user_data); -GList* g_list_sort (GList *list, - GCompareFunc compare_func); -GList* g_list_sort_with_data (GList *list, - GCompareDataFunc compare_func, - gpointer user_data); -gpointer g_list_nth_data (GList *list, - guint n); - -#define g_list_previous(list) ((list) ? (((GList *)(list))->prev) : NULL) -#define g_list_next(list) ((list) ? (((GList *)(list))->next) : NULL) - -G_END_DECLS - -#endif /* __G_LIST_H__ */ - diff --git a/gmacros.h b/gmacros.h deleted file mode 100644 index 5f4055c5b..000000000 --- a/gmacros.h +++ /dev/null @@ -1,193 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* This file must not include any other glib header file and must thus - * not refer to variables from glibconfig.h - */ - -#ifndef __G_MACROS_H__ -#define __G_MACROS_H__ - -/* Here we provide G_GNUC_EXTENSION as an alias for __extension__, - * where this is valid. This allows for warningless compilation of - * "long long" types even in the presence of '-ansi -pedantic'. - */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define G_GNUC_EXTENSION __extension__ -#else -# define G_GNUC_EXTENSION -#endif - -/* Provide macros to feature the GCC function attribute. - */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -#define G_GNUC_PURE \ - __attribute__((pure)) -#else -#define G_GNUC_PURE -#endif - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#define G_GNUC_PRINTF( format_idx, arg_idx ) \ - __attribute__((format (printf, format_idx, arg_idx))) -#define G_GNUC_SCANF( format_idx, arg_idx ) \ - __attribute__((format (scanf, format_idx, arg_idx))) -#define G_GNUC_FORMAT( arg_idx ) \ - __attribute__((format_arg (arg_idx))) -#define G_GNUC_NORETURN \ - __attribute__((noreturn)) -#define G_GNUC_CONST \ - __attribute__((const)) -#define G_GNUC_UNUSED \ - __attribute__((unused)) -#else /* !__GNUC__ */ -#define G_GNUC_PRINTF( format_idx, arg_idx ) -#define G_GNUC_SCANF( format_idx, arg_idx ) -#define G_GNUC_FORMAT( arg_idx ) -#define G_GNUC_NORETURN -#define G_GNUC_CONST -#define G_GNUC_UNUSED -#endif /* !__GNUC__ */ - -/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with - * macros, so we can refer to them as strings unconditionally. - */ -#ifdef __GNUC__ -#define G_GNUC_FUNCTION __FUNCTION__ -#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ -#else /* !__GNUC__ */ -#define G_GNUC_FUNCTION "" -#define G_GNUC_PRETTY_FUNCTION "" -#endif /* !__GNUC__ */ - -#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string) -#define G_STRINGIFY_ARG(contents) #contents - -/* Provide a string identifying the current code position */ -#ifdef __GNUC__ -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ "()" -#else -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - -/* Guard C code in headers, while including them from C++ */ -#ifdef __cplusplus -# define G_BEGIN_DECLS extern "C" { -# define G_END_DECLS } -#else -# define G_BEGIN_DECLS -# define G_END_DECLS -#endif - -/* Provide definitions for some commonly used macros. - * Some of them are only provided if they haven't already - * been defined. It is assumed that if they are already - * defined then the current definition is correct. - */ -#ifndef NULL -# ifdef __cplusplus -# define NULL (0L) -# else /* !__cplusplus */ -# define NULL ((void*) 0) -# endif /* !__cplusplus */ -#endif - -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (!FALSE) -#endif - -#undef MAX -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) - -#undef MIN -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) - -#undef ABS -#define ABS(a) (((a) < 0) ? -(a) : (a)) - -#undef CLAMP -#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) - -/* Count the number of elements in an array. The array must be defined - * as such; using this with a dynamically allocated array will give - * incorrect results. - */ -#define G_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0])) - -/* Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT - */ -#define GPOINTER_TO_SIZE(p) ((gsize) (p)) -#define GSIZE_TO_POINTER(s) ((gpointer) (gsize) (s)) - -/* Provide convenience macros for handling structure - * fields through their offsets. - */ -#define G_STRUCT_OFFSET(struct_type, member) \ - ((glong) ((guint8*) &((struct_type*) 0)->member)) -#define G_STRUCT_MEMBER_P(struct_p, struct_offset) \ - ((gpointer) ((guint8*) (struct_p) + (glong) (struct_offset))) -#define G_STRUCT_MEMBER(member_type, struct_p, struct_offset) \ - (*(member_type*) G_STRUCT_MEMBER_P ((struct_p), (struct_offset))) - -/* Provide simple macro statement wrappers (adapted from Perl): - * G_STMT_START { statements; } G_STMT_END; - * can be used as a single statement, as in - * if (x) G_STMT_START { ... } G_STMT_END; else ... - * - * For gcc we will wrap the statements within `({' and `})' braces. - * For SunOS they will be wrapped within `if (1)' and `else (void) 0', - * and otherwise within `do' and `while (0)'. - */ -#if !(defined (G_STMT_START) && defined (G_STMT_END)) -# if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) -# define G_STMT_START (void)( -# define G_STMT_END ) -# else -# if (defined (sun) || defined (__sun__)) -# define G_STMT_START if (1) -# define G_STMT_END else (void)0 -# else -# define G_STMT_START do -# define G_STMT_END while (0) -# endif -# endif -#endif - -/* Allow the app programmer to select whether or not return values - * (usually char*) are const or not. Don't try using this feature for - * functions with C++ linkage. - */ -#ifdef G_DISABLE_CONST_RETURNS -#define G_CONST_RETURN -#else -#define G_CONST_RETURN const -#endif - -#endif /* __G_MACROS_H__ */ diff --git a/gmain.c b/gmain.c deleted file mode 100644 index 7bff4dfc3..000000000 --- a/gmain.c +++ /dev/null @@ -1,2937 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * gmain.c: Main loop abstraction, timeouts, and idle functions - * Copyright 1998 Owen Taylor - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "config.h" - -/* uncomment the next line to get poll() debugging info */ -/* #define G_MAIN_POLL_DEBUG */ - -#include "glib.h" -#include <sys/types.h> -#include <time.h> -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif /* HAVE_SYS_TIME_H */ -#ifdef GLIB_HAVE_SYS_POLL_H -# include <sys/poll.h> -# undef events /* AIX 4.1.5 & 4.3.2 define this for SVR3,4 compatibility */ -# undef revents /* AIX 4.1.5 & 4.3.2 define this for SVR3,4 compatibility */ -#endif /* GLIB_HAVE_SYS_POLL_H */ -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif /* HAVE_UNISTD_H */ -#include <errno.h> - -#ifdef G_OS_WIN32 -#define STRICT -#include <windows.h> -#endif /* G_OS_WIN32 */ - -#ifdef G_OS_BEOS -#include <net/socket.h> -#endif /* G_OS_BEOS */ - -/* Types */ - -typedef struct _GTimeoutSource GTimeoutSource; -typedef struct _GPollRec GPollRec; -typedef struct _GSourceCallback GSourceCallback; - -typedef enum -{ - G_SOURCE_READY = 1 << G_HOOK_FLAG_USER_SHIFT, - G_SOURCE_CAN_RECURSE = 1 << (G_HOOK_FLAG_USER_SHIFT + 1) -} GSourceFlags; - -struct _GMainContext -{ -#ifdef G_THREADS_ENABLED - /* The following lock is used for both the list of sources - * and the list of poll records - */ - GMutex *mutex; - GThread *thread; -#endif - - GPtrArray *pending_dispatches; - gint timeout; /* Timeout for current iteration */ - - guint next_id; - GSource *source_list; - gint in_check_or_prepare; - - GPollRec *poll_records; - GPollRec *poll_free_list; - GMemChunk *poll_chunk; - guint n_poll_records; - GPollFD *cached_poll_array; - guint cached_poll_array_size; - -#ifdef G_THREADS_ENABLED -#ifndef G_OS_WIN32 -/* this pipe is used to wake up the main loop when a source is added. - */ - gint wake_up_pipe[2]; -#else /* G_OS_WIN32 */ - HANDLE wake_up_semaphore; -#endif /* G_OS_WIN32 */ - - GPollFD wake_up_rec; - gboolean poll_waiting; - -/* Flag indicating whether the set of fd's changed during a poll */ - gboolean poll_changed; -#endif /* G_THREADS_ENABLED */ - - GPollFunc poll_func; - - GTimeVal current_time; - gboolean time_is_current; -}; - -struct _GSourceCallback -{ - guint ref_count; - GSourceFunc func; - gpointer data; - GDestroyNotify notify; -}; - -struct _GMainLoop -{ - GMainContext *context; - gboolean is_running; - guint ref_count; - -#ifdef G_THREADS_ENABLED - GMutex *mutex; - GCond *sem_cond; -#endif /* G_THREADS_ENABLED */ -}; - -struct _GTimeoutSource -{ - GSource source; - GTimeVal expiration; - gint interval; -}; - -struct _GPollRec -{ - gint priority; - GPollFD *fd; - GPollRec *next; -}; - -#ifdef G_THREADS_ENABLED -#define LOCK_CONTEXT(context) g_mutex_lock(context->mutex) -#define UNLOCK_CONTEXT(context) g_mutex_unlock(context->mutex) -#define LOCK_LOOP(loop) g_mutex_lock(loop->mutex) -#define UNLOCK_LOOP(loop) g_mutex_unlock(loop->mutex) -#else -#define LOCK_CONTEXT(context) (void)0 -#define UNLOCK_CONTEXT(context) (void)0 -#define LOCK_LOOP(context) (void)0 -#define UNLOCK_LOOP(context) (void)0 -#endif - -#define SOURCE_DESTROYED(source) (((source)->flags & G_HOOK_FLAG_ACTIVE) == 0) - -#define SOURCE_UNREF(source, context) \ - G_STMT_START { \ - if ((source)->ref_count > 1) \ - (source)->ref_count--; \ - else \ - g_source_unref_internal ((source), (context), TRUE); \ - } G_STMT_END - - -/* Forward declarations */ - -static void g_source_unref_internal (GSource *source, - GMainContext *context, - gboolean have_lock); -static void g_source_destroy_internal (GSource *source, - GMainContext *context, - gboolean have_lock); -static void g_main_context_poll (GMainContext *context, - gint timeout, - gint priority, - GPollFD *fds, - gint n_fds); -static void g_main_context_add_poll_unlocked (GMainContext *context, - gint priority, - GPollFD *fd); -static void g_main_context_remove_poll_unlocked (GMainContext *context, - GPollFD *fd); -static void g_main_context_wakeup (GMainContext *context); - -static gboolean g_timeout_prepare (GSource *source, - gint *timeout); -static gboolean g_timeout_check (GSource *source); -static gboolean g_timeout_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data); -static gboolean g_idle_prepare (GSource *source, - gint *timeout); -static gboolean g_idle_check (GSource *source); -static gboolean g_idle_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data); - -G_LOCK_DEFINE_STATIC (main_loop); -static GMainContext *default_main_context; - -static GSourceFuncs timeout_funcs = -{ - g_timeout_prepare, - g_timeout_check, - g_timeout_dispatch, - NULL -}; - -static GSourceFuncs idle_funcs = -{ - g_idle_prepare, - g_idle_check, - g_idle_dispatch, - NULL -}; - -#ifdef HAVE_POLL -/* SunOS has poll, but doesn't provide a prototype. */ -# if defined (sun) && !defined (__SVR4) -extern gint poll (GPollFD *ufds, guint nfsd, gint timeout); -# endif /* !sun */ -#else /* !HAVE_POLL */ - -#ifdef G_OS_WIN32 - -static gint -g_poll (GPollFD *fds, - guint nfds, - gint timeout) -{ - HANDLE handles[MAXIMUM_WAIT_OBJECTS]; - gboolean poll_msgs = FALSE; - GPollFD *f; - DWORD ready; - MSG msg; - UINT timer; - gint nhandles = 0; - - for (f = fds; f < &fds[nfds]; ++f) - if (f->fd >= 0) - { - if (f->events & G_IO_IN) - { - if (f->fd == G_WIN32_MSG_HANDLE) - poll_msgs = TRUE; - else - { -#ifdef G_MAIN_POLL_DEBUG - g_print ("g_poll: waiting for %#x\n", f->fd); -#endif - handles[nhandles++] = (HANDLE) f->fd; - } - } - } - - if (timeout == -1) - timeout = INFINITE; - - if (poll_msgs) - { - /* Waiting for messages, and maybe events - * -> First PeekMessage - */ -#ifdef G_MAIN_POLL_DEBUG - g_print ("PeekMessage\n"); -#endif - if (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) - ready = WAIT_OBJECT_0 + nhandles; - else - { - if (nhandles == 0) - { - /* Waiting just for messages */ - if (timeout == INFINITE) - { - /* Infinite timeout - * -> WaitMessage - */ -#ifdef G_MAIN_POLL_DEBUG - g_print ("WaitMessage\n"); -#endif - if (!WaitMessage ()) - g_warning (G_STRLOC ": WaitMessage() failed"); - ready = WAIT_OBJECT_0 + nhandles; - } - else if (timeout == 0) - { - /* Waiting just for messages, zero timeout. - * If we got here, there was no message - */ - ready = WAIT_TIMEOUT; - } - else - { - /* Waiting just for messages, some timeout - * -> Set a timer, wait for message, - * kill timer, use PeekMessage - */ - timer = SetTimer (NULL, 0, timeout, NULL); - if (timer == 0) - g_warning (G_STRLOC ": SetTimer() failed"); - else - { -#ifdef G_MAIN_POLL_DEBUG - g_print ("WaitMessage\n"); -#endif - WaitMessage (); - KillTimer (NULL, timer); -#ifdef G_MAIN_POLL_DEBUG - g_print ("PeekMessage\n"); -#endif - if (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE) - && msg.message != WM_TIMER) - ready = WAIT_OBJECT_0; - else - ready = WAIT_TIMEOUT; - } - } - } - else - { - /* Wait for either message or event - * -> Use MsgWaitForMultipleObjects - */ -#ifdef G_MAIN_POLL_DEBUG - g_print ("MsgWaitForMultipleObjects(%d, %d)\n", nhandles, timeout); -#endif - ready = MsgWaitForMultipleObjects (nhandles, handles, FALSE, - timeout, QS_ALLINPUT); - - if (ready == WAIT_FAILED) - g_warning (G_STRLOC ": MsgWaitForMultipleObjects() failed"); - } - } - } - else if (nhandles == 0) - { - /* Wait for nothing (huh?) */ - return 0; - } - else - { - /* Wait for just events - * -> Use WaitForMultipleObjects - */ -#ifdef G_MAIN_POLL_DEBUG - g_print ("WaitForMultipleObjects(%d, %d)\n", nhandles, timeout); -#endif - ready = WaitForMultipleObjects (nhandles, handles, FALSE, timeout); - if (ready == WAIT_FAILED) - g_warning (G_STRLOC ": WaitForMultipleObjects() failed"); - } - -#ifdef G_MAIN_POLL_DEBUG - g_print ("wait returns %d%s\n", - ready, - (ready == WAIT_FAILED ? " (WAIT_FAILED)" : - (ready == WAIT_TIMEOUT ? " (WAIT_TIMEOUT)" : - (poll_msgs && ready == WAIT_OBJECT_0 + nhandles ? " (msg)" : "")))); -#endif - for (f = fds; f < &fds[nfds]; ++f) - f->revents = 0; - - if (ready == WAIT_FAILED) - return -1; - else if (ready == WAIT_TIMEOUT) - return 0; - else if (poll_msgs && ready == WAIT_OBJECT_0 + nhandles) - { - for (f = fds; f < &fds[nfds]; ++f) - if (f->fd >= 0) - { - if (f->events & G_IO_IN) - if (f->fd == G_WIN32_MSG_HANDLE) - f->revents |= G_IO_IN; - } - } -#if TEST_WITHOUT_THIS - else if (ready >= WAIT_OBJECT_0 && ready < WAIT_OBJECT_0 + nhandles) - for (f = fds; f < &fds[nfds]; ++f) - { - if ((f->events & G_IO_IN) - && f->fd == (gint) handles[ready - WAIT_OBJECT_0]) - { - f->revents |= G_IO_IN; -#ifdef G_MAIN_POLL_DEBUG - g_print ("g_poll: got event %#x\n", f->fd); -#endif -#if 0 - ResetEvent ((HANDLE) f->fd); -#endif - } - } -#endif - - return 1; -} - -#else /* !G_OS_WIN32 */ - -/* The following implementation of poll() comes from the GNU C Library. - * Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. - */ - -#include <string.h> /* for bzero on BSD systems */ - -#ifdef HAVE_SYS_SELECT_H -#include <sys/select.h> -#endif /* HAVE_SYS_SELECT_H */ - -#ifdef G_OS_BEOS -#undef NO_FD_SET -#endif /* G_OS_BEOS */ - -#ifndef NO_FD_SET -# define SELECT_MASK fd_set -#else /* !NO_FD_SET */ -# ifndef _AIX -typedef long fd_mask; -# endif /* _AIX */ -# ifdef _IBMR2 -# define SELECT_MASK void -# else /* !_IBMR2 */ -# define SELECT_MASK int -# endif /* !_IBMR2 */ -#endif /* !NO_FD_SET */ - -static gint -g_poll (GPollFD *fds, - guint nfds, - gint timeout) -{ - struct timeval tv; - SELECT_MASK rset, wset, xset; - GPollFD *f; - int ready; - int maxfd = 0; - - FD_ZERO (&rset); - FD_ZERO (&wset); - FD_ZERO (&xset); - - for (f = fds; f < &fds[nfds]; ++f) - if (f->fd >= 0) - { - if (f->events & G_IO_IN) - FD_SET (f->fd, &rset); - if (f->events & G_IO_OUT) - FD_SET (f->fd, &wset); - if (f->events & G_IO_PRI) - FD_SET (f->fd, &xset); - if (f->fd > maxfd && (f->events & (G_IO_IN|G_IO_OUT|G_IO_PRI))) - maxfd = f->fd; - } - - tv.tv_sec = timeout / 1000; - tv.tv_usec = (timeout % 1000) * 1000; - - ready = select (maxfd + 1, &rset, &wset, &xset, - timeout == -1 ? NULL : &tv); - if (ready > 0) - for (f = fds; f < &fds[nfds]; ++f) - { - f->revents = 0; - if (f->fd >= 0) - { - if (FD_ISSET (f->fd, &rset)) - f->revents |= G_IO_IN; - if (FD_ISSET (f->fd, &wset)) - f->revents |= G_IO_OUT; - if (FD_ISSET (f->fd, &xset)) - f->revents |= G_IO_PRI; - } - } - - return ready; -} - -#endif /* !G_OS_WIN32 */ - -#endif /* !HAVE_POLL */ - -/* Called to clean up when a thread terminates - */ -void -g_main_context_destroy (GMainContext *context) -{ - GSource *source; - - /* We need the lock here only because g_source_destroy expects - * to be able to unlock when destroying the source's data - */ - LOCK_CONTEXT (context); - source = context->source_list; - while (source) - { - GSource *next = source->next; - g_source_destroy_internal (source, context, TRUE); - source = next; - } - UNLOCK_CONTEXT (context); - -#ifdef G_THREADS_ENABLED - g_mutex_free (context->mutex); -#endif - - g_ptr_array_free (context->pending_dispatches, TRUE); - g_free (context->cached_poll_array); - - g_mem_chunk_destroy (context->poll_chunk); - -#ifdef G_THREADS_ENABLED - if (g_thread_supported()) - { -#ifndef G_OS_WIN32 - close (context->wake_up_pipe[0]); - close (context->wake_up_pipe[1]); -#else - CloseHandle (context->wake_up_semaphore); -#endif - } -#endif - - g_free (context); -} - -/* This is an imcomplete (only the members up till context) version of - * GRealThread from gthread.h. Keep them in sync */ -typedef struct _GRealThread GRealThread; -struct _GRealThread -{ - GThread thread; - GMainContext *context; -}; - -/** - * g_main_context_get: - * @thread: a #GThread - * - * Retrieves the main loop context for a particular thread. This - * will create the main context for the thread if none previously - * existed. The context will exist until the thread terminates. - * - * Return value: the main loop context for @thread. - **/ -GMainContext * -g_main_context_get (GThread *thread) -{ - GRealThread *real_thread = (GRealThread*)thread; - GMainContext *context; - - g_return_val_if_fail (thread != NULL, NULL); - - if (g_thread_supported ()) - context = real_thread->context; - else - context = default_main_context; - - if (!context) - { - context = g_new0 (GMainContext, 1); - -#ifdef G_THREADS_ENABLED - if (g_thread_supported ()) - context->mutex = g_mutex_new(); - - context->thread = thread; -#endif - - context->next_id = 1; - - context->source_list = NULL; - -#if HAVE_POLL - context->poll_func = (GPollFunc)poll; -#else - context->poll_func = g_poll; -#endif - - context->cached_poll_array = NULL; - context->cached_poll_array_size = 0; - - context->pending_dispatches = g_ptr_array_new (); - - context->time_is_current = FALSE; - -#ifdef G_THREADS_ENABLED - if (g_thread_supported ()) - { -#ifndef G_OS_WIN32 - if (pipe (context->wake_up_pipe) < 0) - g_error ("Cannot create pipe main loop wake-up: %s\n", - g_strerror (errno)); - - context->wake_up_rec.fd = context->wake_up_pipe[0]; - context->wake_up_rec.events = G_IO_IN; - g_main_context_add_poll_unlocked (context, 0, &context->wake_up_rec); -#else - context->wake_up_semaphore = CreateSemaphore (NULL, 0, 100, NULL); - if (context->wake_up_semaphore == NULL) - g_error ("Cannot create wake-up semaphore: %s", - g_win32_error_message (GetLastError ())); - context->wake_up_rec.fd = (gint) context->wake_up_semaphore; - context->wake_up_rec.events = G_IO_IN; -#ifdef G_MAIN_POLL_DEBUG - g_print ("wake-up semaphore: %#x\n", (guint) context->wake_up_semaphore); -#endif - g_main_context_add_poll_unlocked (context, 0, &context->wake_up_rec); -#endif - } -#endif - - if (g_thread_supported ()) - real_thread->context = context; - else - default_main_context = context; - } - - return context; -} - -/** - * g_main_context_default: - * - * Return the default main context. This is the main context used - * for main loop functions when a main loop is not explicitly - * specified. - * - * Return value: the default main context. - **/ -GMainContext * -g_main_context_default (void) -{ - /* Slow, but safe */ - - G_LOCK (main_loop); - - if (!default_main_context) - default_main_context = g_main_context_get (g_thread_self ()); - - G_UNLOCK (main_loop); - - return default_main_context; -} - -/* Hooks for adding to the main loop */ - -/** - * g_source_new: - * @source_funcs: structure containing functions that implement - * the sources behavior. - * @struct_size: size of the #GSource structure to create - * - * Create a new GSource structure. The size is specified to - * allow creating structures derived from GSource that contain - * additional data. The size passed in must be at least - * sizeof(GSource). - * - * The source will not initially be associated with any #GMainContext - * and must be added to one with g_source_add() before it will be - * executed. - * - * Return value: the newly create #GSource - **/ -GSource * -g_source_new (GSourceFuncs *source_funcs, - guint struct_size) -{ - GSource *source; - - g_return_val_if_fail (source_funcs != NULL, NULL); - g_return_val_if_fail (struct_size >= sizeof (GSource), NULL); - - source = (GSource*) g_malloc0 (struct_size); - - source->source_funcs = source_funcs; - source->ref_count = 1; - - source->priority = G_PRIORITY_DEFAULT; - - source->flags = G_HOOK_FLAG_ACTIVE; - - /* NULL/0 initialization for all other fields */ - - return source; -} - -/* Holds context's lock - */ -static void -g_source_list_add (GSource *source, - GMainContext *context) -{ - GSource *tmp_source, *last_source; - - last_source = NULL; - tmp_source = context->source_list; - while (tmp_source && tmp_source->priority <= source->priority) - { - last_source = tmp_source; - tmp_source = tmp_source->next; - } - - source->next = tmp_source; - if (tmp_source) - tmp_source->prev = source; - - source->prev = last_source; - if (last_source) - last_source->next = source; - else - context->source_list = source; -} - -/* Holds context's lock - */ -static void -g_source_list_remove (GSource *source, - GMainContext *context) -{ - if (source->prev) - source->prev->next = source->next; - else - context->source_list = source->next; - - if (source->next) - source->next->prev = source->prev; - - source->prev = NULL; - source->next = NULL; -} - -/** - * g_source_attach: - * @source: a #GSource - * @context: a #GMainContext (if %NULL, the default context will be used) - * - * Adds a #GSource to a @context so that it will be executed within - * that context. - * - * Return value: the ID for the source within the #GMainContext - **/ -guint -g_source_attach (GSource *source, - GMainContext *context) -{ - guint result = 0; - GSList *tmp_list; - - g_return_val_if_fail (source->context == NULL, 0); - g_return_val_if_fail (!SOURCE_DESTROYED (source), 0); - - if (!context) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - - source->context = context; - result = source->id = context->next_id++; - - source->ref_count++; - g_source_list_add (source, context); - - tmp_list = source->poll_fds; - while (tmp_list) - { - g_main_context_add_poll_unlocked (context, source->priority, tmp_list->data); - tmp_list = tmp_list->next; - } - -#ifdef G_THREADS_ENABLED - /* Now wake up the main loop if it is waiting in the poll() */ - g_main_context_wakeup (context); -#endif - - UNLOCK_CONTEXT (context); - - return result; -} - -static void -g_source_destroy_internal (GSource *source, - GMainContext *context, - gboolean have_lock) -{ - if (!have_lock) - LOCK_CONTEXT (context); - - if (!SOURCE_DESTROYED (source)) - { - GSList *tmp_list; - gpointer old_cb_data; - GSourceCallbackFuncs *old_cb_funcs; - - source->flags &= ~G_HOOK_FLAG_ACTIVE; - - old_cb_data = source->callback_data; - old_cb_funcs = source->callback_funcs; - - source->callback_data = NULL; - source->callback_funcs = NULL; - - if (old_cb_funcs) - { - UNLOCK_CONTEXT (context); - old_cb_funcs->unref (old_cb_data); - LOCK_CONTEXT (context); - } - - tmp_list = source->poll_fds; - while (tmp_list) - { - g_main_context_remove_poll_unlocked (context, tmp_list->data); - tmp_list = tmp_list->next; - } - - g_source_unref_internal (source, context, TRUE); - } - - if (!have_lock) - UNLOCK_CONTEXT (context); -} - -/** - * g_source_destroy: - * @source: a #GSource - * - * Remove a source from its #GMainContext, if any, and mark it as - * destroyed. The source cannot be subsequently added to another - * context. - **/ -void -g_source_destroy (GSource *source) -{ - GMainContext *context; - - g_return_if_fail (source != NULL); - - context = source->context; - - if (context) - g_source_destroy_internal (source, context, FALSE); - else - source->flags &= ~G_HOOK_FLAG_ACTIVE; -} - -/** - * g_source_get_id: - * @source: a #GSource - * - * Return the numeric ID for a particular source. The ID of a source - * is unique within a particular main loop context. The reverse - * mapping from ID to source is done by g_main_context_find_source_by_id(). - * - * Return value: the ID for the source - **/ -guint -g_source_get_id (GSource *source) -{ - guint result; - - g_return_val_if_fail (source != NULL, 0); - g_return_val_if_fail (source->context != NULL, 0); - - LOCK_CONTEXT (source->context); - result = source->id; - UNLOCK_CONTEXT (source->context); - - return result; -} - -/** - * g_source_get_context: - * @source: a #GSource - * - * Get the #GMainContext with which the source is associated. - * Calling this function on a destroyed source is an error. - * - * Return value: the #GMainContext with which the source is associated, - * or %NULL if the context has not yet been added - * to a source. - **/ -GMainContext * -g_source_get_context (GSource *source) -{ - g_return_val_if_fail (!SOURCE_DESTROYED (source), NULL); - - return source->context; -} - -/** - * g_source_add_poll: - * @source:a #GSource - * @fd: a #GPollFD structure holding information about a file - * descriptor to watch. - * - * Add a file descriptor to the set of file descriptors polled for - * this source. This is usually combined with g_source_new() to add an - * event source. The event source's check function will typically test - * the revents field in the #GPollFD struct and return %TRUE if events need - * to be processed. - **/ -void -g_source_add_poll (GSource *source, - GPollFD *fd) -{ - GMainContext *context; - - g_return_if_fail (source != NULL); - g_return_if_fail (fd != NULL); - g_return_if_fail (!SOURCE_DESTROYED (source)); - - context = source->context; - - if (context) - LOCK_CONTEXT (context); - - source->poll_fds = g_slist_prepend (source->poll_fds, fd); - - if (context) - { - g_main_context_add_poll_unlocked (context, source->priority, fd); - UNLOCK_CONTEXT (context); - } -} - -/** - * g_source_remove_poll: - * @source:a #GSource - * @fd: a #GPollFD structure previously passed to g_source_poll. - * - * Remove a file descriptor from the set of file descriptors polled for - * this source. - **/ -void -g_source_remove_poll (GSource *source, - GPollFD *fd) -{ - GMainContext *context; - - g_return_if_fail (source != NULL); - g_return_if_fail (fd != NULL); - g_return_if_fail (!SOURCE_DESTROYED (source)); - - context = source->context; - - if (context) - LOCK_CONTEXT (context); - - source->poll_fds = g_slist_remove (source->poll_fds, fd); - - if (context) - { - g_main_context_remove_poll_unlocked (context, fd); - UNLOCK_CONTEXT (context); - } -} - -/** - * g_source_set_callback_indirect: - * @source: the source - * @callback_data: pointer to callback data "object" - * @callback_funcs: functions for reference counting callback_data - * and getting the callback and data - * - * Set the callback function storing the data as a refcounted callback - * "object". This is used to implement g_source_set_callback_closure() - * and internally. Note that calling g_source_set_callback_indirect() assumes - * an initial reference count on @callback_data, and thus - * @callback_funcs->unref will eventually be called once more - * than @callback_funcs->ref. - **/ -void -g_source_set_callback_indirect (GSource *source, - gpointer callback_data, - GSourceCallbackFuncs *callback_funcs) -{ - GMainContext *context; - gpointer old_cb_data; - GSourceCallbackFuncs *old_cb_funcs; - - g_return_if_fail (source != NULL); - g_return_if_fail (callback_funcs != NULL || callback_data == NULL); - - context = source->context; - - if (context) - LOCK_CONTEXT (context); - - old_cb_data = source->callback_data; - old_cb_funcs = source->callback_funcs; - - source->callback_data = callback_data; - source->callback_funcs = callback_funcs; - - if (context) - UNLOCK_CONTEXT (context); - - if (old_cb_funcs) - old_cb_funcs->unref (old_cb_data); -} - -static void -g_source_callback_ref (gpointer cb_data) -{ - GSourceCallback *callback = cb_data; - - callback->ref_count++; -} - - -static void -g_source_callback_unref (gpointer cb_data) -{ - GSourceCallback *callback = cb_data; - - callback->ref_count--; - if (callback->ref_count == 0) - { - if (callback->notify) - callback->notify (callback->data); - g_free (callback); - } -} - -static void -g_source_callback_get (gpointer cb_data, - GSourceFunc *func, - gpointer *data) -{ - GSourceCallback *callback = cb_data; - - *func = callback->func; - *data = callback->data; -} - -static GSourceCallbackFuncs g_source_callback_funcs = { - g_source_callback_ref, - g_source_callback_unref, - g_source_callback_get, -}; - -/** - * g_source_set_callback: - * @source: the source - * @func: a callback function - * @data: the data to pass to callback function - * @notify: a function to call when @data is no longer in use, or %NULL. - * - * Set the callback function for a source. - **/ -void -g_source_set_callback (GSource *source, - GSourceFunc func, - gpointer data, - GDestroyNotify notify) -{ - GSourceCallback *new_callback; - - g_return_if_fail (source != NULL); - - new_callback = g_new (GSourceCallback, 1); - - new_callback->ref_count = 1; - new_callback->func = func; - new_callback->data = data; - new_callback->notify = notify; - - g_source_set_callback_indirect (source, new_callback, &g_source_callback_funcs); -} - -/** - * g_source_set_priority: - * @source: a #GSource - * @priority: the new priority. - * - * Set the priority of a source. While the main loop is being - * run, a source will - **/ -void -g_source_set_priority (GSource *source, - gint priority) -{ - GSList *tmp_list; - GMainContext *context; - - g_return_if_fail (source != NULL); - - context = source->context; - - if (context) - LOCK_CONTEXT (context); - - source->priority = priority; - - if (context) - { - source->next = NULL; - source->prev = NULL; - - tmp_list = source->poll_fds; - while (tmp_list) - { - g_main_context_remove_poll_unlocked (context, tmp_list->data); - g_main_context_add_poll_unlocked (context, priority, tmp_list->data); - - tmp_list = tmp_list->next; - } - - UNLOCK_CONTEXT (source->context); - } -} - -/** - * g_source_get_priority: - * @source: a #GSource - * - * Gets the priority of a surce - * - * Return value: the priority of the source - **/ -gint -g_source_get_priority (GSource *source) -{ - g_return_val_if_fail (source != NULL, 0); - - return source->priority; -} - -/** - * g_source_set_can_recurse: - * @source: a #GSource - * @can_recurse: whether recursion is allowed for this source - * - * Sets whether a source can be called recursively. If @can_recurse is - * %TRUE, then while the source is being dispatched then this source - * will be processed normally. Otherwise, all processing of this - * source is blocked until the dispatch function returns. - **/ -void -g_source_set_can_recurse (GSource *source, - gboolean can_recurse) -{ - GMainContext *context; - - g_return_if_fail (source != NULL); - - context = source->context; - - if (context) - LOCK_CONTEXT (context); - - if (can_recurse) - source->flags |= G_SOURCE_CAN_RECURSE; - else - source->flags &= ~G_SOURCE_CAN_RECURSE; - - if (context) - UNLOCK_CONTEXT (context); -} - -/** - * g_source_get_can_recurse: - * @source: a #GSource - * - * Checks whether a source is allowed to be called recursively. - * see g_source_set_can_recurse. - * - * Return value: whether recursion is allowed. - **/ -gboolean -g_source_get_can_recurse (GSource *source) -{ - g_return_val_if_fail (source != NULL, FALSE); - - return (source->flags & G_SOURCE_CAN_RECURSE) != 0; -} - -/** - * g_source_ref: - * @source: a #GSource - * - * Increases the reference count on a source by one. - * - * Return value: @source - **/ -GSource * -g_source_ref (GSource *source) -{ - GMainContext *context; - - g_return_val_if_fail (source != NULL, NULL); - - context = source->context; - - if (context) - LOCK_CONTEXT (context); - - source->ref_count++; - - if (context) - UNLOCK_CONTEXT (context); - - return source; -} - -/* g_source_unref() but possible to call within context lock - */ -static void -g_source_unref_internal (GSource *source, - GMainContext *context, - gboolean have_lock) -{ - gpointer old_cb_data = NULL; - GSourceCallbackFuncs *old_cb_funcs = NULL; - - g_return_if_fail (source != NULL); - - if (!have_lock && context) - LOCK_CONTEXT (context); - - source->ref_count--; - if (source->ref_count == 0) - { - old_cb_data = source->callback_data; - old_cb_funcs = source->callback_funcs; - - source->callback_data = NULL; - source->callback_funcs = NULL; - - if (context && !SOURCE_DESTROYED (source)) - { - g_warning (G_STRLOC ": ref_count == 0, but source is still attached to a context!"); - source->ref_count++; - } - else if (context) - g_source_list_remove (source, context); - - if (source->source_funcs->destroy) - source->source_funcs->destroy (source); - - g_slist_free (source->poll_fds); - source->poll_fds = NULL; - g_free (source); - } - - if (!have_lock && context) - UNLOCK_CONTEXT (context); - - if (old_cb_funcs) - { - if (have_lock) - UNLOCK_CONTEXT (context); - - old_cb_funcs->unref (old_cb_data); - - if (have_lock) - LOCK_CONTEXT (context); - } -} - -/** - * g_source_unref: - * @source: a #GSource - * - * Decreases the reference count of a source by one. If the - * resulting reference count is zero the source and associated - * memory will be destroyed. - **/ -void -g_source_unref (GSource *source) -{ - g_return_if_fail (source != NULL); - - g_source_unref_internal (source, source->context, FALSE); -} - -/** - * g_main_context_find_source_by_id: - * @context: a #GMainContext (if %NULL, the default context will be used) - * @id: the source ID, as returned by g_source_get_id() - * - * Finds a #GSource given a pair of context and ID - * - * Return value: the #GSource if found, otherwise, %NULL - **/ -GSource * -g_main_context_find_source_by_id (GMainContext *context, - guint id) -{ - GSource *source; - - g_return_val_if_fail (id > 0, FALSE); - - if (context == NULL) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - - source = context->source_list; - while (source) - { - if (!SOURCE_DESTROYED (source) && - source->id == id) - break; - source = source->next; - } - - UNLOCK_CONTEXT (context); - - return source; -} - -/** - * g_main_context_find_source_by_funcs_user_data: - * @context: a #GMainContext (if %NULL, the default context will be used). - * @funcs: the @source_funcs passed to g_source_new(). - * @user_data: the user data from the callback. - * - * Finds a source with the given source functions and user data. If - * multiple sources exist with the same source function and user data, - * the first one found will be returned. - * - * Return value: the source, if one was found, otherwise %NULL - **/ -GSource * -g_main_context_find_source_by_funcs_user_data (GMainContext *context, - GSourceFuncs *funcs, - gpointer user_data) -{ - GSource *source; - - g_return_val_if_fail (funcs != NULL, FALSE); - - if (context == NULL) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - - source = context->source_list; - while (source) - { - if (!SOURCE_DESTROYED (source) && - source->source_funcs == funcs && - source->callback_data == user_data) - break; - source = source->next; - } - - UNLOCK_CONTEXT (context); - - return source; -} - -/** - * g_main_context_find_source_by_user_data: - * @context: a #GMainContext - * @user_data: the user_data for the callback. - * - * Finds a source with the given user data for the callback. If - * multiple sources exist with the same user data, the first - * one found will be returned. - * - * Return value: the source, if one was found, otherwise %NULL - **/ -GSource * -g_main_context_find_source_by_user_data (GMainContext *context, - gpointer user_data) -{ - GSource *source; - - if (context == NULL) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - - source = context->source_list; - while (source) - { - if (!SOURCE_DESTROYED (source) && - source->callback_data == user_data) - break; - source = source->next; - } - - UNLOCK_CONTEXT (context); - - return source; -} - -/** - * g_source_remove: - * @tag: the id of the source to remove. - * - * Removes the source with the given id from the default main - * context. The id of a #GSource is given by g_source_get_id(), - * or will be returned by the functions g_source_attach(), - * g_idle_add(), g_idle_add_full(), g_timeout_add(), - * g_timeout_add_full(), g_io_add_watch, and g_io_add_watch_full(). - * - * See also g_source_destroy(). - * - * Return value: %TRUE if the source was found and removed. - **/ -gboolean -g_source_remove (guint tag) -{ - GSource *source; - - g_return_val_if_fail (tag > 0, FALSE); - - source = g_main_context_find_source_by_id (NULL, tag); - if (source) - g_source_destroy (source); - - return source != NULL; -} - -/** - * g_source_remove_by_user_data: - * @user_data: the user_data for the callback. - * - * Removes a source from the default main loop context given the user - * data for the callback. If multiple sources exist with the same user - * data, only one will be destroyed. - * - * Return value: %TRUE if a source was found and removed. - **/ -gboolean -g_source_remove_by_user_data (gpointer user_data) -{ - GSource *source; - - source = g_main_context_find_source_by_user_data (NULL, user_data); - if (source) - { - g_source_destroy (source); - return TRUE; - } - else - return FALSE; -} - -/** - * g_source_remove_by_funcs_user_data: - * @funcs: The @source_funcs passed to g_source_new() - * @user_data: the user data for the callback - * - * Removes a source from the default main loop context given the - * source functions and user data. If multiple sources exist with the - * same source functions and user data, only one will be destroyed. - * - * Return value: %TRUE if a source was found and removed. - **/ -gboolean -g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, - gpointer user_data) -{ - GSource *source; - - g_return_val_if_fail (funcs != NULL, FALSE); - - source = g_main_context_find_source_by_funcs_user_data (NULL, funcs, user_data); - if (source) - { - g_source_destroy (source); - return TRUE; - } - else - return FALSE; -} - -/** - * g_get_current_time: - * @result: #GTimeVal structure in which to store current time. - * - * Equivalent to Unix's <function>gettimeofday()</function>, but portable - **/ -void -g_get_current_time (GTimeVal *result) -{ -#ifndef G_OS_WIN32 - struct timeval r; - - g_return_if_fail (result != NULL); - - /*this is required on alpha, there the timeval structs are int's - not longs and a cast only would fail horribly*/ - gettimeofday (&r, NULL); - result->tv_sec = r.tv_sec; - result->tv_usec = r.tv_usec; -#else - /* Avoid calling time() except for the first time. - * GetTickCount() should be pretty fast and low-level? - * I could also use ftime() but it seems unnecessarily overheady. - */ - static DWORD start_tick = 0; - static time_t start_time; - DWORD tick; - - g_return_if_fail (result != NULL); - - if (start_tick == 0) - { - start_tick = GetTickCount (); - time (&start_time); - } - - tick = GetTickCount (); - - result->tv_sec = (tick - start_tick) / 1000 + start_time; - result->tv_usec = ((tick - start_tick) % 1000) * 1000; -#endif -} - -/* Running the main loop */ - -/* HOLDS: context's lock */ -static void -g_main_dispatch (GMainContext *context) -{ - guint i; - - for (i = 0; i < context->pending_dispatches->len; i++) - { - GSource *source = context->pending_dispatches->pdata[i]; - - context->pending_dispatches->pdata[i] = NULL; - g_assert (source); - - source->flags &= ~G_SOURCE_READY; - - if (!SOURCE_DESTROYED (source)) - { - gboolean was_in_call; - gpointer user_data = NULL; - GSourceFunc callback = NULL; - GSourceCallbackFuncs *cb_funcs; - gpointer cb_data; - gboolean need_destroy; - - gboolean (*dispatch) (GSource *, - GSourceFunc, - gpointer); - - dispatch = source->source_funcs->dispatch; - cb_funcs = source->callback_funcs; - cb_data = source->callback_data; - - if (cb_funcs) - cb_funcs->ref (cb_data); - - was_in_call = source->flags & G_HOOK_FLAG_IN_CALL; - source->flags |= G_HOOK_FLAG_IN_CALL; - - UNLOCK_CONTEXT (context); - - if (cb_funcs) - cb_funcs->get (cb_data, &callback, &user_data); - - need_destroy = ! dispatch (source, - callback, - user_data); - LOCK_CONTEXT (context); - - if (cb_funcs) - cb_funcs->unref (cb_data); - - if (!was_in_call) - source->flags &= ~G_HOOK_FLAG_IN_CALL; - - /* Note: this depends on the fact that we can't switch - * sources from one main context to another - */ - if (need_destroy && !SOURCE_DESTROYED (source)) - { - g_assert (source->context == context); - g_source_destroy_internal (source, context, TRUE); - } - } - - SOURCE_UNREF (source, context); - } - - g_ptr_array_set_size (context->pending_dispatches, 0); -} - -/* Holds context's lock */ -static inline GSource * -next_valid_source (GMainContext *context, - GSource *source) -{ - GSource *new_source = source ? source->next : context->source_list; - - while (new_source) - { - if (!SOURCE_DESTROYED (new_source)) - { - new_source->ref_count++; - break; - } - - new_source = new_source->next; - } - - if (source) - SOURCE_UNREF (source, context); - - return new_source; -} - - -/** - * g_main_context_prepare: - * @context: a #GMainContext - * @priority: location to store priority of highest priority - * source already ready. - * - * Prepares to poll sources within a main loop. The resulting information - * for polling is determined by calling g_main_context_query (). - * - * Return value: %TRUE if some source is ready to be dispatched - * prior to polling. - **/ -gboolean -g_main_context_prepare (GMainContext *context, - gint *priority) -{ - gint n_ready = 0; - gint current_priority = G_MAXINT; - GSource *source; - - if (context == NULL) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - - context->time_is_current = FALSE; - - if (context->in_check_or_prepare) - { - g_warning ("g_main_context_prepare() called recursively from within a source's check() or " - "prepare() member."); - UNLOCK_CONTEXT (context); - return FALSE; - } - -#ifdef G_THREADS_ENABLED - if (context->poll_waiting) - { - g_warning("g_main_context_prepare(): main loop already active in another thread"); - UNLOCK_CONTEXT (context); - return FALSE; - } - - context->poll_waiting = TRUE; -#endif /* G_THREADS_ENABLED */ - -#if 0 - /* If recursing, finish up current dispatch, before starting over */ - if (context->pending_dispatches) - { - if (dispatch) - g_main_dispatch (context, ¤t_time); - - UNLOCK_CONTEXT (context); - return TRUE; - } -#endif - - /* If recursing, clear list of pending dispatches */ - g_ptr_array_set_size (context->pending_dispatches, 0); - - /* Prepare all sources */ - - context->timeout = -1; - - source = next_valid_source (context, NULL); - while (source) - { - gint source_timeout = -1; - - if ((n_ready > 0) && (source->priority > current_priority)) - { - SOURCE_UNREF (source, context); - break; - } - if ((source->flags & G_HOOK_FLAG_IN_CALL) && !(source->flags & G_SOURCE_CAN_RECURSE)) - goto next; - - if (!(source->flags & G_SOURCE_READY)) - { - gboolean result; - gboolean (*prepare) (GSource *source, - gint *timeout); - - prepare = source->source_funcs->prepare; - context->in_check_or_prepare++; - UNLOCK_CONTEXT (context); - - result = (*prepare) (source, &source_timeout); - - LOCK_CONTEXT (context); - context->in_check_or_prepare--; - - if (result) - source->flags |= G_SOURCE_READY; - } - - if (source->flags & G_SOURCE_READY) - { - n_ready++; - current_priority = source->priority; - context->timeout = 0; - } - - if (source_timeout >= 0) - { - if (context->timeout < 0) - context->timeout = source_timeout; - else - context->timeout = MIN (context->timeout, source_timeout); - } - - next: - source = next_valid_source (context, source); - } - - UNLOCK_CONTEXT (context); - - if (priority) - *priority = current_priority; - - return (n_ready > 0); -} - -/** - * g_main_context_query: - * @context: a #GMainContext - * @max_priority: maximum priority source to check - * @timeout: location to store timeout to be used in polling - * @fds: location to store #GPollFD records that need to be polled. - * @n_fds: length of @fds. - * - * Determines information necessary to poll this main loop. - * - * Return value: - **/ -gint -g_main_context_query (GMainContext *context, - gint max_priority, - gint *timeout, - GPollFD *fds, - gint n_fds) -{ - gint n_poll; - GPollRec *pollrec; - - LOCK_CONTEXT (context); - - pollrec = context->poll_records; - n_poll = 0; - while (pollrec && max_priority >= pollrec->priority) - { - if (pollrec->fd->events) - { - if (n_poll < n_fds) - { - fds[n_poll].fd = pollrec->fd->fd; - /* In direct contradiction to the Unix98 spec, IRIX runs into - * difficulty if you pass in POLLERR, POLLHUP or POLLNVAL - * flags in the events field of the pollfd while it should - * just ignoring them. So we mask them out here. - */ - fds[n_poll].events = pollrec->fd->events & ~(G_IO_ERR|G_IO_HUP|G_IO_NVAL); - fds[n_poll].revents = 0; - } - n_poll++; - } - - pollrec = pollrec->next; - } - -#ifdef G_THREADS_ENABLED - context->poll_changed = FALSE; -#endif - - if (timeout) - { - *timeout = context->timeout; - if (timeout != 0) - context->time_is_current = FALSE; - } - - UNLOCK_CONTEXT (context); - - return n_poll; -} - -/** - * g_main_context_check: - * @context: a #GMainContext - * @max_priority: the maximum numerical priority of sources to check - * @fds: array of #GPollFD's that was passed to the last call to - * g_main_context_query() - * @n_fds: return value of g_main_context_query() - * - * Pass the results of polling back to the main loop. - * - * Return value: %TRUE if some sources are ready to be dispatched. - **/ -gboolean -g_main_context_check (GMainContext *context, - gint max_priority, - GPollFD *fds, - gint n_fds) -{ - GSource *source; - GPollRec *pollrec; - gint n_ready = 0; - gint i; - - LOCK_CONTEXT (context); - - if (context->in_check_or_prepare) - { - g_warning ("g_main_context_check() called recursively from within a source's check() or " - "prepare() member."); - UNLOCK_CONTEXT (context); - return FALSE; - } - -#ifdef G_THREADS_ENABLED - if (!context->poll_waiting) - { -#ifndef G_OS_WIN32 - gchar c; - read (context->wake_up_pipe[0], &c, 1); -#endif - } - else - context->poll_waiting = FALSE; - - /* If the set of poll file descriptors changed, bail out - * and let the main loop rerun - */ - if (context->poll_changed) - { - UNLOCK_CONTEXT (context); - return 0; - } -#endif /* G_THREADS_ENABLED */ - - pollrec = context->poll_records; - i = 0; - while (i < n_fds) - { - if (pollrec->fd->events) - { - pollrec->fd->revents = fds[i].revents; - i++; - } - pollrec = pollrec->next; - } - - source = next_valid_source (context, NULL); - while (source) - { - if ((n_ready > 0) && (source->priority > max_priority)) - { - SOURCE_UNREF (source, context); - break; - } - if ((source->flags & G_HOOK_FLAG_IN_CALL) && !(source->flags & G_SOURCE_CAN_RECURSE)) - goto next; - - if (!(source->flags & G_SOURCE_READY)) - { - gboolean result; - gboolean (*check) (GSource *source); - - check = source->source_funcs->check; - - context->in_check_or_prepare++; - UNLOCK_CONTEXT (context); - - result = (*check) (source); - - LOCK_CONTEXT (context); - context->in_check_or_prepare--; - - if (result) - source->flags |= G_SOURCE_READY; - } - - if (source->flags & G_SOURCE_READY) - { - source->ref_count++; - g_ptr_array_add (context->pending_dispatches, source); - - n_ready++; - } - - next: - source = next_valid_source (context, source); - } - - UNLOCK_CONTEXT (context); - - return n_ready > 0; -} - -/** - * g_main_context_dispatch: - * @context: a #GMainContext - * - * Dispatch all pending sources() - **/ -void -g_main_context_dispatch (GMainContext *context) -{ - LOCK_CONTEXT (context); - - if (context->pending_dispatches->len > 0) - { - g_main_dispatch (context); - } - - UNLOCK_CONTEXT (context); -} - -static gboolean -g_main_context_iterate (GMainContext *context, - gboolean block, - gboolean dispatch) -{ - gint max_priority; - gint timeout; - gboolean some_ready; - gint nfds, new_nfds; - GPollFD *fds; - - some_ready = g_main_context_prepare (context, &max_priority); - - do - { - LOCK_CONTEXT (context); - - if (context->cached_poll_array) - { - nfds = context->cached_poll_array_size; - fds = context->cached_poll_array; - context->cached_poll_array = NULL; - } - else - { - nfds = context->cached_poll_array_size = context->n_poll_records; - fds = g_new (GPollFD, nfds); - } - - UNLOCK_CONTEXT (context); - - new_nfds = g_main_context_query (context, max_priority, - &timeout, fds, nfds); - } - while (new_nfds > nfds); - - if (!block) - timeout = 0; - - g_main_context_poll (context, timeout, max_priority, - fds, new_nfds); - - g_main_context_check (context, - max_priority, - fds, new_nfds); - - LOCK_CONTEXT (context); - - g_assert (!context->cached_poll_array); - - context->cached_poll_array = fds; - context->cached_poll_array_size = nfds; - - UNLOCK_CONTEXT (context); - - if (dispatch) - g_main_context_dispatch (context); - - return some_ready; -} - -/** - * g_main_context_pending: - * @context: a #GMainContext (if %NULL, the default context will be used) - * - * Check if any sources have pending events for the given context. - * - * Return value: %TRUE if events are pending. - **/ -gboolean -g_main_context_pending (GMainContext *context) -{ - if (!context) - context = g_main_context_default(); - - return g_main_context_iterate (context, FALSE, FALSE); -} - -/** - * g_main_context_iteration: - * @context: a #GMainContext (if %NULL, the default context will be used) - * @may_block: whether the call may block. - * - * Run a single iteration for the given main loop. This involves - * checking to see if any event sources are ready to be processed, - * then if no events sources are ready and @may_block is %TRUE, waiting - * for a source to become ready, then dispatching the highest priority - * events sources that are ready. Note that even when @may_block is %TRUE, - * it is still possible for g_main_context_iteration() to return - * %FALSE, since the the wait may be interrupted for other - * reasons than an event source becoming ready. - * - * Return value: %TRUE if events were dispatched. - **/ -gboolean -g_main_context_iteration (GMainContext *context, gboolean may_block) -{ - if (!context) - context = g_main_context_default(); - - return g_main_context_iterate (context, may_block, TRUE); -} - -/** - * g_main_loop_new: - * @context: a #GMainContext (if %NULL, the default context will be used). - * @is_running: set to TRUE to indicate that the loop is running. This - * is not very important since calling g_main_run() will set this to - * TRUE anyway. - * - * Create a new #GMainLoop structure - * - * Return value: - **/ -GMainLoop * -g_main_loop_new (GMainContext *context, - gboolean is_running) -{ - GMainLoop *loop; - - if (!context) - context = g_main_context_default(); - - loop = g_new0 (GMainLoop, 1); - loop->context = context; - loop->is_running = is_running != FALSE; - loop->ref_count = 1; - -#ifdef G_THREADS_ENABLED - if (g_thread_supported ()) - loop->mutex = g_mutex_new (); - else - loop->mutex = NULL; - loop->sem_cond = NULL; -#endif /* G_THREADS_ENABLED */ - - return loop; -} - -/** - * g_main_loop_ref: - * @loop: a #GMainLoop - * - * Increase the reference count on a #GMainLoop object by one. - * - * Return value: @loop - **/ -GMainLoop * -g_main_loop_ref (GMainLoop *loop) -{ - g_return_val_if_fail (loop != NULL, NULL); - - LOCK_LOOP (loop); - loop->ref_count++; - UNLOCK_LOOP (loop); - - return loop; -} - -static void -main_loop_destroy (GMainLoop *loop) -{ -#ifdef G_THREADS_ENABLED - g_mutex_free (loop->mutex); - if (loop->sem_cond) - g_cond_free (loop->sem_cond); -#endif /* G_THREADS_ENABLED */ - - g_free (loop); -} - -/** - * g_main_loop_unref: - * @loop: a #GMainLoop - * - * Decreases the reference count on a #GMainLoop object by one. If - * the result is zero, free the loop and free all associated memory. - **/ -void -g_main_loop_unref (GMainLoop *loop) -{ - g_return_if_fail (loop != NULL); - g_return_if_fail (loop->ref_count > 0); - - LOCK_LOOP (loop); - - loop->ref_count--; - if (loop->ref_count == 0) - { - /* When the ref_count is 0, there can be nobody else using the - * loop, so it is safe to unlock before destroying. - */ - UNLOCK_LOOP (loop); - main_loop_destroy (loop); - } - else - UNLOCK_LOOP (loop); -} - -/** - * g_main_loop_run: - * @loop: a #GMainLoop - * - * Run a main loop until g_main_quit() is called on the loop. - * If this is called for the thread of the loop's #GMainContext, - * it will process events from the loop, otherwise it will - * simply wait. - **/ -void -g_main_loop_run (GMainLoop *loop) -{ - g_return_if_fail (loop != NULL); - - /* The assumption here is that a reference is held to the loop - * until we recursively iterate - */ -#ifdef G_THREADS_ENABLED - if (loop->context->thread != g_thread_self ()) - { - LOCK_LOOP (loop); - - loop->ref_count++; - - if (!g_thread_supported ()) - { - g_warning ("g_main_loop_run() was called from second thread but" - "g_thread_init() was never called."); - } - else - { - if (!loop->sem_cond) - loop->sem_cond = g_cond_new (); - - if (!loop->is_running) - loop->is_running = TRUE; - - while (loop->is_running) - g_cond_wait (loop->sem_cond, loop->mutex); - } - } - else -#endif /* G_THREADS_ENABLED */ - { - LOCK_CONTEXT (loop->context); - if (loop->context->in_check_or_prepare) - { - g_warning ("g_main_run(): called recursively from within a source's check() or " - "prepare() member, iteration not possible."); - return; - } - UNLOCK_CONTEXT (loop->context); - - LOCK_LOOP (loop); - - loop->ref_count++; - loop->is_running = TRUE; - while (loop->is_running) - { - UNLOCK_LOOP (loop); - g_main_context_iterate (loop->context, TRUE, TRUE); - LOCK_LOOP (loop); - } - } - - /* We inline this here rather than calling g_main_loop_unref() to - * avoid an extra unlock/lock. - */ - loop->ref_count--; - if (loop->ref_count == 0) - { - UNLOCK_LOOP (loop); - main_loop_destroy (loop); - } - else - UNLOCK_LOOP (loop); -} - -/** - * g_main_loop_quit: - * @loop: a #GMainLoop - * - * Stops a #GMainLoop from running. Any calls to g_main_loop_run() - * for the loop will return. - **/ -void -g_main_loop_quit (GMainLoop *loop) -{ - g_return_if_fail (loop != NULL); - - LOCK_LOOP (loop); - loop->is_running = FALSE; - -#ifdef G_THREADS_ENABLED - if (loop->sem_cond) - g_cond_broadcast (loop->sem_cond); -#endif - - UNLOCK_LOOP (loop); - - LOCK_CONTEXT (loop->context); - - g_main_context_wakeup (loop->context); - UNLOCK_CONTEXT (loop->context); -} - -/** - * g_main_loop_is_running: - * @loop: a #GMainLoop. - * - * Check to see if the main loop is currently being run via g_main_run() - * - * Return value: %TRUE if the mainloop is currently being run. - **/ -gboolean -g_main_loop_is_running (GMainLoop *loop) -{ - gboolean result; - - g_return_val_if_fail (loop != NULL, FALSE); - - LOCK_LOOP (loop); - result = loop->is_running; - UNLOCK_LOOP (loop); - - return result; -} - -/* HOLDS: context's lock */ -static void -g_main_context_poll (GMainContext *context, - gint timeout, - gint priority, - GPollFD *fds, - gint n_fds) -{ -#ifdef G_MAIN_POLL_DEBUG - GTimer *poll_timer; - GPollRec *pollrec; - gint i; -#endif - - GPollFunc poll_func; - - if (n_fds || timeout != 0) - { -#ifdef G_MAIN_POLL_DEBUG - g_print ("g_main_poll(%d) timeout: %d\n", n_fds, timeout); - poll_timer = g_timer_new (); -#endif - - LOCK_CONTEXT (context); - - poll_func = context->poll_func; - - UNLOCK_CONTEXT (context); - if ((*poll_func) (fds, n_fds, timeout) < 0 && errno != EINTR) - g_warning ("poll(2) failed due to: %s.", - g_strerror (errno)); - -#ifdef G_MAIN_POLL_DEBUG - LOCK_CONTEXT (context); - - g_print ("g_main_poll(%d) timeout: %d - elapsed %12.10f seconds", - n_fds, - timeout, - g_timer_elapsed (poll_timer, NULL)); - g_timer_destroy (poll_timer); - pollrec = context->poll_records; - i = 0; - while (i < n_fds) - { - if (pollrec->fd->events) - { - if (fds[i].revents) - { - g_print (" [%d:", fds[i].fd); - if (fds[i].revents & G_IO_IN) - g_print ("i"); - if (fds[i].revents & G_IO_OUT) - g_print ("o"); - if (fds[i].revents & G_IO_PRI) - g_print ("p"); - if (fds[i].revents & G_IO_ERR) - g_print ("e"); - if (fds[i].revents & G_IO_HUP) - g_print ("h"); - if (fds[i].revents & G_IO_NVAL) - g_print ("n"); - g_print ("]"); - } - i++; - } - pollrec = pollrec->next; - } - g_print ("\n"); - - UNLOCK_CONTEXT (context); -#endif - } /* if (n_fds || timeout != 0) */ -} - -/** - * g_main_context_add_poll: - * @context: a #GMainContext (or %NULL for the default context) - * @fd: a #GPollFD structure holding information about a file - * descriptor to watch. - * @priority: the priority for this file descriptor which should be - * the same as the priority used for g_source_attach() to ensure that the - * file descriptor is polled whenever the results may be needed. - * - * Add a file descriptor to the set of file descriptors polled * for - * this context. This will very seldom be used directly. Instead - * a typical event source will use g_source_add_poll() instead. - **/ -void -g_main_context_add_poll (GMainContext *context, - GPollFD *fd, - gint priority) -{ - if (!context) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - g_main_context_add_poll_unlocked (context, priority, fd); - UNLOCK_CONTEXT (context); -} - -/* HOLDS: main_loop_lock */ -static void -g_main_context_add_poll_unlocked (GMainContext *context, - gint priority, - GPollFD *fd) -{ - GPollRec *lastrec, *pollrec, *newrec; - - if (!context->poll_chunk) - context->poll_chunk = g_mem_chunk_create (GPollRec, 32, G_ALLOC_ONLY); - - if (context->poll_free_list) - { - newrec = context->poll_free_list; - context->poll_free_list = newrec->next; - } - else - newrec = g_chunk_new (GPollRec, context->poll_chunk); - - /* This file descriptor may be checked before we ever poll */ - fd->revents = 0; - newrec->fd = fd; - newrec->priority = priority; - - lastrec = NULL; - pollrec = context->poll_records; - while (pollrec && priority >= pollrec->priority) - { - lastrec = pollrec; - pollrec = pollrec->next; - } - - if (lastrec) - lastrec->next = newrec; - else - context->poll_records = newrec; - - newrec->next = pollrec; - - context->n_poll_records++; - if (context->cached_poll_array && - context->cached_poll_array_size < context->n_poll_records) - { - g_free (context->cached_poll_array); - context->cached_poll_array = NULL; - } - -#ifdef G_THREADS_ENABLED - context->poll_changed = TRUE; - - /* Now wake up the main loop if it is waiting in the poll() */ - g_main_context_wakeup (context); -#endif -} - -/** - * g_main_context_remove_poll: - * @context:a #GMainContext - * @fd: a #GPollFD descriptor previously added with g_main_context_add_poll() - * - * Remove file descriptor from the set of file descriptors to be - * polled for a particular context. - **/ -void -g_main_context_remove_poll (GMainContext *context, - GPollFD *fd) -{ - if (!context) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - - g_main_context_remove_poll_unlocked (context, fd); - - UNLOCK_CONTEXT (context); -} - -static void -g_main_context_remove_poll_unlocked (GMainContext *context, - GPollFD *fd) -{ - GPollRec *pollrec, *lastrec; - - lastrec = NULL; - pollrec = context->poll_records; - - while (pollrec) - { - if (pollrec->fd == fd) - { - if (lastrec != NULL) - lastrec->next = pollrec->next; - else - context->poll_records = pollrec->next; - -#ifdef ENABLE_GC_FRIENDLY - pollrec->fd = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - pollrec->next = context->poll_free_list; - context->poll_free_list = pollrec; - - context->n_poll_records--; - break; - } - lastrec = pollrec; - pollrec = pollrec->next; - } - -#ifdef G_THREADS_ENABLED - context->poll_changed = TRUE; - - /* Now wake up the main loop if it is waiting in the poll() */ - g_main_context_wakeup (context); -#endif -} - -/** - * g_source_get_current_time: - * @source: a #GSource - * @timeval: #GTimeVal structure in which to store current time. - * - * Gets the "current time" to be used when checking - * this source. The advantage of calling this function over - * calling g_get_current_time() directly is that when - * checking multiple sources, GLib can cache a single value - * instead of having to repeatedly get the system time. - **/ -void -g_source_get_current_time (GSource *source, - GTimeVal *timeval) -{ - GMainContext *context; - - g_return_if_fail (source->context != NULL); - - context = source->context; - - LOCK_CONTEXT (context); - - if (!context->time_is_current) - { - g_get_current_time (&context->current_time); - context->time_is_current = TRUE; - } - - *timeval = context->current_time; - - UNLOCK_CONTEXT (context); -} - -/** - * g_main_context_set_poll_func: - * @context: a #GMainContext - * @func: the function to call to poll all file descriptors - * - * Sets the function to use to handle polling of file descriptors. It - * will be used instead of the poll() system call (or GLib's - * replacement function, which is used where poll() isn't available). - * - * This function could possibly be used to integrate the GLib event - * loop with an external event loop. - **/ -void -g_main_context_set_poll_func (GMainContext *context, - GPollFunc func) -{ - if (!context) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - - if (func) - context->poll_func = func; - else - { -#ifdef HAVE_POLL - context->poll_func = (GPollFunc) poll; -#else - context->poll_func = (GPollFunc) g_poll; -#endif - } - - UNLOCK_CONTEXT (context); -} - -/** - * g_main_context_get_poll_func: - * @context: a #GMainContext - * - * Gets the poll function set by g_main_context_set_poll_func() - * - * Return value: the poll function - **/ -GPollFunc -g_main_context_get_poll_func (GMainContext *context) -{ - GPollFunc result; - - if (!context) - context = g_main_context_default (); - - LOCK_CONTEXT (context); - result = context->poll_func; - UNLOCK_CONTEXT (context); - - return result; -} - -/* HOLDS: context's lock */ -/* Wake the main loop up from a poll() */ -static void -g_main_context_wakeup (GMainContext *context) -{ -#ifdef G_THREADS_ENABLED - if (g_thread_supported() && context->poll_waiting) - { - context->poll_waiting = FALSE; -#ifndef G_OS_WIN32 - write (context->wake_up_pipe[1], "A", 1); -#else - ReleaseSemaphore (context->wake_up_semaphore, 1, NULL); -#endif - } -#endif -} - -/* Timeouts */ - -static void -g_timeout_set_expiration (GTimeoutSource *timeout_source, - GTimeVal *current_time) -{ - guint seconds = timeout_source->interval / 1000; - guint msecs = timeout_source->interval - seconds * 1000; - - timeout_source->expiration.tv_sec = current_time->tv_sec + seconds; - timeout_source->expiration.tv_usec = current_time->tv_usec + msecs * 1000; - if (timeout_source->expiration.tv_usec >= 1000000) - { - timeout_source->expiration.tv_usec -= 1000000; - timeout_source->expiration.tv_sec++; - } -} - -static gboolean -g_timeout_prepare (GSource *source, - gint *timeout) -{ - glong sec; - glong msec; - GTimeVal current_time; - - GTimeoutSource *timeout_source = (GTimeoutSource *)source; - - g_source_get_current_time (source, ¤t_time); - - sec = timeout_source->expiration.tv_sec - current_time.tv_sec; - msec = (timeout_source->expiration.tv_usec - current_time.tv_usec) / 1000; - - /* We do the following in a rather convoluted fashion to deal with - * the fact that we don't have an integral type big enough to hold - * the difference of two timevals in millseconds. - */ - if (sec < 0 || (sec == 0 && msec < 0)) - msec = 0; - else - { - glong interval_sec = timeout_source->interval / 1000; - glong interval_msec = timeout_source->interval % 1000; - - if (msec < 0) - { - msec += 1000; - sec -= 1; - } - - if (sec > interval_sec || - (sec == interval_sec && msec > interval_msec)) - { - /* The system time has been set backwards, so we - * reset the expiration time to now + timeout_source->interval; - * this at least avoids hanging for long periods of time. - */ - g_timeout_set_expiration (timeout_source, ¤t_time); - msec = timeout_source->interval; - } - else - { - msec += sec * 1000; - } - } - - *timeout = (gint)msec; - - return msec == 0; -} - -static gboolean -g_timeout_check (GSource *source) -{ - GTimeVal current_time; - GTimeoutSource *timeout_source = (GTimeoutSource *)source; - - g_source_get_current_time (source, ¤t_time); - - return ((timeout_source->expiration.tv_sec < current_time.tv_sec) || - ((timeout_source->expiration.tv_sec == current_time.tv_sec) && - (timeout_source->expiration.tv_usec <= current_time.tv_usec))); -} - -static gboolean -g_timeout_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data) -{ - GTimeoutSource *timeout_source = (GTimeoutSource *)source; - - if (!callback) - { - g_warning ("Timeout source dispatched without callback\n" - "You must call g_source_set_callback()."); - return FALSE; - } - - if (callback (user_data)) - { - GTimeVal current_time; - - g_source_get_current_time (source, ¤t_time); - g_timeout_set_expiration (timeout_source, ¤t_time); - - return TRUE; - } - else - return FALSE; -} - -/** - * g_timeout_source_new: - * @interval: the timeout interval in milliseconds. - * - * Create a new timeout source. - * - * The source will not initially be associated with any #GMainContext - * and must be added to one with g_source_attach() before it will be - * executed. - * - * Return value: the newly create timeout source - **/ -GSource * -g_timeout_source_new (guint interval) -{ - GSource *source = g_source_new (&timeout_funcs, sizeof (GTimeoutSource)); - GTimeoutSource *timeout_source = (GTimeoutSource *)source; - GTimeVal current_time; - - timeout_source->interval = interval; - - g_get_current_time (¤t_time); - g_timeout_set_expiration (timeout_source, ¤t_time); - - return source; -} - -/** - * g_timeout_add_full: - * @priority: the priority of the idle source. Typically this will be in the - * range btweeen #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. - * @interval: the time between calls to the function, in milliseconds - * (1/1000ths of a second.) - * @function: function to call - * @data: data to pass to @function - * @notify: function to call when the idle is removed, or %NULL - * - * Sets a function to be called at regular intervals, with the given - * priority. The function is called repeatedly until it returns - * FALSE, at which point the timeout is automatically destroyed and - * the function will not be called again. The @notify function is - * called when the timeout is destroyed. The first call to the - * function will be at the end of the first @interval. - * - * Note that timeout functions may be delayed, due to the processing of other - * event sources. Thus they should not be relied on for precise timing. - * After each call to the timeout function, the time of the next - * timeout is recalculated based on the current time and the given interval - * (it does not try to 'catch up' time lost in delays). - * - * Return value: the id of event source. - **/ -guint -g_timeout_add_full (gint priority, - guint interval, - GSourceFunc function, - gpointer data, - GDestroyNotify notify) -{ - GSource *source; - guint id; - - g_return_val_if_fail (function != NULL, 0); - - source = g_timeout_source_new (interval); - - if (priority != G_PRIORITY_DEFAULT) - g_source_set_priority (source, priority); - - g_source_set_callback (source, function, data, notify); - id = g_source_attach (source, NULL); - g_source_unref (source); - - return id; -} - -/** - * g_timeout_add: - * @interval: the time between calls to the function, in milliseconds - * (1/1000ths of a second.) - * @function: function to call - * @data: data to pass to @function - * - * Sets a function to be called at regular intervals, with the default - * priority, #G_PRIORITY_DEFAULT. The function is called repeatedly - * until it returns FALSE, at which point the timeout is automatically - * destroyed and the function will not be called again. The @notify - * function is called when the timeout is destroyed. The first call - * to the function will be at the end of the first @interval. - * - * Note that timeout functions may be delayed, due to the processing of other - * event sources. Thus they should not be relied on for precise timing. - * After each call to the timeout function, the time of the next - * timeout is recalculated based on the current time and the given interval - * (it does not try to 'catch up' time lost in delays). - * - * Return value: the id of event source. - **/ -guint -g_timeout_add (guint32 interval, - GSourceFunc function, - gpointer data) -{ - return g_timeout_add_full (G_PRIORITY_DEFAULT, - interval, function, data, NULL); -} - -/* Idle functions */ - -static gboolean -g_idle_prepare (GSource *source, - gint *timeout) -{ - *timeout = 0; - - return TRUE; -} - -static gboolean -g_idle_check (GSource *source) -{ - return TRUE; -} - -static gboolean -g_idle_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data) -{ - if (!callback) - { - g_warning ("Idle source dispatched without callback\n" - "You must call g_source_set_callback()."); - return FALSE; - } - - return callback (user_data); -} - -/** - * g_idle_source_new: - * - * Create a new idle source. - * - * The source will not initially be associated with any #GMainContext - * and must be added to one with g_source_attach() before it will be - * executed. - * - * Return value: the newly created idle source - **/ -GSource * -g_idle_source_new (void) -{ - return g_source_new (&idle_funcs, sizeof (GSource)); -} - -/** - * g_idle_add_full: - * @priority: the priority of the idle source. Typically this will be in the - * range btweeen #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. - * @function: function to call - * @data: data to pass to @function - * @notify: function to call when the idle is removed, or %NULL - * - * Adds a function to be called whenever there are no higher priority - * events pending. If the function returns FALSE it is automatically - * removed from the list of event sources and will not be called again. - * - * Return value: the id of the event source. - **/ -guint -g_idle_add_full (gint priority, - GSourceFunc function, - gpointer data, - GDestroyNotify notify) -{ - GSource *source; - guint id; - - g_return_val_if_fail (function != NULL, 0); - - source = g_idle_source_new (); - - if (priority != G_PRIORITY_DEFAULT) - g_source_set_priority (source, priority); - - g_source_set_callback (source, function, data, notify); - id = g_source_attach (source, NULL); - g_source_unref (source); - - return id; -} - -/** - * g_idle_add: - * @function: function to call - * @data: data to pass to @function. - * - * Adds a function to be called whenever there are no higher priority - * events pending to the default main loop. The function is given the - * default idle priority, #G_PRIORITY_DEFAULT_IDLE. If the function - * returns FALSE it is automatically removed from the list of event - * sources and will not be called again. - * - * Return value: the id of the event source. - **/ -guint -g_idle_add (GSourceFunc function, - gpointer data) -{ - return g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, function, data, NULL); -} - -/** - * g_idle_remove_by_data: - * @data: the data for the idle source's callback. - * - * Removes the idle function with the given data. - * - * Return value: %TRUE if an idle source was found and removed. - **/ -gboolean -g_idle_remove_by_data (gpointer data) -{ - return g_source_remove_by_funcs_user_data (&idle_funcs, data); -} - diff --git a/gmain.h b/gmain.h deleted file mode 100644 index 70a64de1a..000000000 --- a/gmain.h +++ /dev/null @@ -1,291 +0,0 @@ -/* gmain.h - the GLib Main loop - * Copyright (C) 1998-2000 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __G_MAIN_H__ -#define __G_MAIN_H__ - -#include <gslist.h> -#include <gthread.h> - -G_BEGIN_DECLS - -typedef struct _GMainContext GMainContext; /* Opaque */ -typedef struct _GMainLoop GMainLoop; /* Opaque */ -typedef struct _GSource GSource; -typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs; -typedef struct _GSourceFuncs GSourceFuncs; - -typedef gboolean (*GSourceFunc) (gpointer data); - -struct _GSource -{ - /*< private >*/ - gpointer callback_data; - GSourceCallbackFuncs *callback_funcs; - - GSourceFuncs *source_funcs; - guint ref_count; - - GMainContext *context; - - gint priority; - guint flags; - guint id; - - GSList *poll_fds; - - GSource *prev; - GSource *next; -}; - -struct _GSourceCallbackFuncs -{ - void (*ref) (gpointer cb_data); - void (*unref) (gpointer cb_data); - void (*get) (gpointer cb_data, - GSourceFunc *func, - gpointer *data); -}; - -struct _GSourceFuncs -{ - gboolean (*prepare) (GSource *source, - gint *timeout); - gboolean (*check) (GSource *source); - gboolean (*dispatch) (GSource *source, - GSourceFunc callback, - gpointer user_data); - void (*destroy) (GSource *source); /* Can be NULL */ -}; - -/* Any definitions using GPollFD or GPollFunc are primarily - * for Unix and not guaranteed to be the compatible on all - * operating systems on which GLib runs. Right now, the - * GLib does use these functions on Win32 as well, but interprets - * them in a fairly different way than on Unix. If you use - * these definitions, you are should be prepared to recode - * for different operating systems. - * - * - * On Win32, the fd in a GPollFD should be Win32 HANDLE (*not* a file - * descriptor as provided by the C runtime) that can be used by - * MsgWaitForMultipleObjects. This does *not* include file handles - * from CreateFile, SOCKETs, nor pipe handles. (But you can use - * WSAEventSelect to signal events when a SOCKET is readable). - * - * On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to - * indicate polling for messages. These message queue GPollFDs should - * be added with the g_main_poll_win32_msg_add function. - * - * But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK - * (GTK) programs, as GDK itself wants to read messages and convert them - * to GDK events. - * - * So, unless you really know what you are doing, it's best not to try - * to use the main loop polling stuff for your own needs on - * Win32. It's really only written for the GIMP's needs so - * far. - */ -typedef struct _GPollFD GPollFD; -typedef gint (*GPollFunc) (GPollFD *ufds, - guint nfsd, - gint timeout); - -struct _GPollFD -{ - gint fd; - gushort events; - gushort revents; -}; - -/* Standard priorities */ - -#define G_PRIORITY_HIGH -100 -#define G_PRIORITY_DEFAULT 0 -#define G_PRIORITY_HIGH_IDLE 100 -#define G_PRIORITY_DEFAULT_IDLE 200 -#define G_PRIORITY_LOW 300 - -/* GMainContext: */ - -GMainContext *g_main_context_get (GThread *thread); -GMainContext *g_main_context_default (void); - -gboolean g_main_context_iteration (GMainContext *context, - gboolean may_block); -gboolean g_main_context_pending (GMainContext *context); - -/* For implementation of legacy interfaces - */ -GSource *g_main_context_find_source_by_id (GMainContext *context, - guint id); -GSource *g_main_context_find_source_by_user_data (GMainContext *context, - gpointer user_data); -GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context, - GSourceFuncs *funcs, - gpointer user_data); - -/* Low level functions for implementing custom main loops. - */ -gboolean g_main_context_prepare (GMainContext *context, - gint *priority); -gint g_main_context_query (GMainContext *context, - gint max_priority, - gint *timeout, - GPollFD *fds, - gint n_fds); -gint g_main_context_check (GMainContext *context, - gint max_priority, - GPollFD *fds, - gint n_fds); -void g_main_context_dispatch (GMainContext *context); - -void g_main_context_set_poll_func (GMainContext *context, - GPollFunc func); -GPollFunc g_main_context_get_poll_func (GMainContext *context); - -/* Low level functions for use by source implementations - */ -void g_main_context_add_poll (GMainContext *context, - GPollFD *fd, - gint priority); -void g_main_context_remove_poll (GMainContext *context, - GPollFD *fd); - -/* GMainLoop: */ - -GMainLoop *g_main_loop_new (GMainContext *context, - gboolean is_running); -void g_main_loop_run (GMainLoop *loop); -void g_main_loop_quit (GMainLoop *loop); -GMainLoop *g_main_loop_ref (GMainLoop *loop); -void g_main_loop_unref (GMainLoop *loop); -gboolean g_main_loop_is_running (GMainLoop *loop); - -/* GSource: */ - -GSource *g_source_new (GSourceFuncs *source_funcs, - guint struct_size); -GSource *g_source_ref (GSource *source); -void g_source_unref (GSource *source); - -guint g_source_attach (GSource *source, - GMainContext *context); -void g_source_destroy (GSource *source); - -void g_source_set_priority (GSource *source, - gint priority); -gint g_source_get_priority (GSource *source); -void g_source_set_can_recurse (GSource *source, - gboolean can_recurse); -gboolean g_source_get_can_recurse (GSource *source); -guint g_source_get_id (GSource *source); - -GMainContext *g_source_get_context (GSource *source); - -void g_source_set_callback (GSource *source, - GSourceFunc func, - gpointer data, - GDestroyNotify notify); - - -/* Used to implement g_source_connect_closure and internally*/ -void g_source_set_callback_indirect (GSource *source, - gpointer callback_data, - GSourceCallbackFuncs *callback_funcs); - -void g_source_add_poll (GSource *source, - GPollFD *fd); -void g_source_remove_poll (GSource *source, - GPollFD *fd); - -void g_source_get_current_time (GSource *source, - GTimeVal *timeval); - - /* void g_source_connect_closure (GSource *source, - GClosure *closure); - */ - -/* Specific source types - */ -GSource *g_idle_source_new (void); -GSource *g_timeout_source_new (guint interval); - -/* Miscellaneous functions - */ -void g_get_current_time (GTimeVal *result); - -/* ============== Compat main loop stuff ================== */ - -#ifndef G_DISABLE_DEPRECATED - -/* Legacy names for GMainLoop functions - */ -#define g_main_new(is_running) g_main_loop_new (NULL, is_running); -#define g_main_run(loop) g_main_loop_run(loop) -#define g_main_quit(loop) g_main_loop_quit(loop) -#define g_main_destroy(loop) g_main_loop_unref(loop) -#define g_main_is_running(loop) g_main_loop_is_running(loop) - -/* Functions to manipulate the default main loop - */ - -#define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block) -#define g_main_pending() g_main_context_pending (NULL) - -#define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func) - -#endif /* G_DISABLE_DEPRECATED */ - -/* Source manipulation by ID */ -gboolean g_source_remove (guint tag); -gboolean g_source_remove_by_user_data (gpointer user_data); -gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, - gpointer user_data); - -/* Idles and timeouts */ -guint g_timeout_add_full (gint priority, - guint interval, - GSourceFunc function, - gpointer data, - GDestroyNotify notify); -guint g_timeout_add (guint interval, - GSourceFunc function, - gpointer data); -guint g_idle_add (GSourceFunc function, - gpointer data); -guint g_idle_add_full (gint priority, - GSourceFunc function, - gpointer data, - GDestroyNotify notify); -gboolean g_idle_remove_by_data (gpointer data); - -#ifdef G_OS_WIN32 - -/* This is used to add polling for Windows messages. GDK (GTK+) programs - * should *not* use this. - */ -void g_main_poll_win32_msg_add (gint priority, - GPollFD *fd, - guint hwnd); -#endif /* G_OS_WIN32 */ - -G_END_DECLS - -#endif /* __G_MAIN_H__ */ diff --git a/gmarkup.c b/gmarkup.c deleted file mode 100644 index 3ae2a7676..000000000 --- a/gmarkup.c +++ /dev/null @@ -1,1735 +0,0 @@ -/* gmarkup.c - Simple XML-like parser - * - * Copyright 2000 Red Hat, Inc. - * - * GLib is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "glib.h" - -#include <string.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#include "glibintl.h" - -GQuark -g_markup_error_quark () -{ - static GQuark error_quark = 0; - - if (error_quark == 0) - error_quark = g_quark_from_static_string ("g-markup-error-quark"); - - return error_quark; -} - -typedef enum -{ - STATE_START, - STATE_AFTER_OPEN_ANGLE, - STATE_AFTER_CLOSE_ANGLE, - STATE_AFTER_ELISION_SLASH, /* the slash that obviates need for end element */ - STATE_INSIDE_OPEN_TAG_NAME, - STATE_INSIDE_ATTRIBUTE_NAME, - STATE_BETWEEN_ATTRIBUTES, - STATE_AFTER_ATTRIBUTE_EQUALS_SIGN, - STATE_INSIDE_ATTRIBUTE_VALUE, - STATE_INSIDE_TEXT, - STATE_AFTER_CLOSE_TAG_SLASH, - STATE_INSIDE_CLOSE_TAG_NAME, - STATE_INSIDE_PASSTHROUGH, - STATE_ERROR -} GMarkupParseState; - -struct _GMarkupParseContext -{ - const GMarkupParser *parser; - - GMarkupParseFlags flags; - - gint line_number; - gint char_number; - - gpointer user_data; - GDestroyNotify dnotify; - - /* A piece of character data or an element that - * hasn't "ended" yet so we haven't yet called - * the callback for it. - */ - GString *partial_chunk; - - GMarkupParseState state; - GSList *tag_stack; - gchar **attr_names; - gchar **attr_values; - gint cur_attr; - gint alloc_attrs; - - const gchar *current_text; - gssize current_text_len; - const gchar *current_text_end; - - GString *leftover_char_portion; - - /* used to save the start of the last interesting thingy */ - const gchar *start; - - const gchar *iter; - - guint document_empty : 1; - guint parsing : 1; -}; - -/** - * g_markup_parse_context_new: - * @parser: a #GMarkupParser - * @flags: one or more #GMarkupParseFlags - * @user_data: user data to pass to #GMarkupParser functions - * @user_data_dnotify: user data destroy notifier called when the parse context is freed - * - * Creates a new parse context. A parse context is used to parse - * marked-up documents. You can feed any number of documents into - * a context, as long as no errors occur; once an error occurs, - * the parse context can't continue to parse text (you have to free it - * and create a new parse context). - * - * Return value: a new #GMarkupParseContext - **/ -GMarkupParseContext * -g_markup_parse_context_new (const GMarkupParser *parser, - GMarkupParseFlags flags, - gpointer user_data, - GDestroyNotify user_data_dnotify) -{ - GMarkupParseContext *context; - - g_return_val_if_fail (parser != NULL, NULL); - - context = g_new (GMarkupParseContext, 1); - - context->parser = parser; - context->flags = flags; - context->user_data = user_data; - context->dnotify = user_data_dnotify; - - context->line_number = 1; - context->char_number = 1; - - context->partial_chunk = NULL; - - context->state = STATE_START; - context->tag_stack = NULL; - context->attr_names = NULL; - context->attr_values = NULL; - context->cur_attr = -1; - context->alloc_attrs = 0; - - context->current_text = NULL; - context->current_text_len = -1; - context->current_text_end = NULL; - context->leftover_char_portion = NULL; - - context->start = NULL; - context->iter = NULL; - - context->document_empty = TRUE; - context->parsing = FALSE; - - return context; -} - -/** - * g_markup_parse_context_free: - * @context: a #GMarkupParseContext - * - * Frees a #GMarkupParseContext. Can't be called from inside - * one of the #GMarkupParser functions. - * - **/ -void -g_markup_parse_context_free (GMarkupParseContext *context) -{ - g_return_if_fail (context != NULL); - g_return_if_fail (!context->parsing); - - if (context->dnotify) - (* context->dnotify) (context->user_data); - - g_strfreev (context->attr_names); - g_strfreev (context->attr_values); - - g_slist_foreach (context->tag_stack, (GFunc)g_free, NULL); - g_slist_free (context->tag_stack); - - if (context->partial_chunk) - g_string_free (context->partial_chunk, TRUE); - - if (context->leftover_char_portion) - g_string_free (context->leftover_char_portion, TRUE); - - g_free (context); -} - -static void -mark_error (GMarkupParseContext *context, - GError *error) -{ - context->state = STATE_ERROR; - - if (context->parser->error) - (*context->parser->error) (context, error, context->user_data); -} - -static void -set_error (GMarkupParseContext *context, - GError **error, - GMarkupError code, - const gchar *format, - ...) -{ - GError *tmp_error; - gchar *s; - va_list args; - - va_start (args, format); - s = g_strdup_vprintf (format, args); - va_end (args); - - tmp_error = g_error_new (G_MARKUP_ERROR, - code, - _("Error on line %d char %d: %s"), - context->line_number, - context->char_number, - s); - - g_free (s); - - mark_error (context, tmp_error); - - g_propagate_error (error, tmp_error); -} - -static gboolean -is_name_start_char (gunichar c) -{ - if (g_unichar_isalpha (c) || - c == '_' || - c == ':') - return TRUE; - else - return FALSE; -} - -static gboolean -is_name_char (gunichar c) -{ - if (g_unichar_isalnum (c) || - c == '.' || - c == '-' || - c == '_' || - c == ':') - return TRUE; - else - return FALSE; -} - - -static gchar* -char_str (gunichar c, - gchar *buf) -{ - memset (buf, 0, 7); - g_unichar_to_utf8 (c, buf); - return buf; -} - -static gchar* -utf8_str (const gchar *utf8, - gchar *buf) -{ - char_str (g_utf8_get_char (utf8), buf); - return buf; -} - -static void -set_unescape_error (GMarkupParseContext *context, - GError **error, - const gchar *remaining_text, - const gchar *remaining_text_end, - GMarkupError code, - const gchar *format, - ...) -{ - GError *tmp_error; - gchar *s; - va_list args; - gint remaining_newlines; - const gchar *p; - - remaining_newlines = 0; - p = remaining_text; - while (p != remaining_text_end) - { - if (*p == '\n') - ++remaining_newlines; - ++p; - } - - va_start (args, format); - s = g_strdup_vprintf (format, args); - va_end (args); - - tmp_error = g_error_new (G_MARKUP_ERROR, - code, - _("Error on line %d: %s"), - context->line_number - remaining_newlines, - s); - - g_free (s); - - mark_error (context, tmp_error); - - g_propagate_error (error, tmp_error); -} - -typedef enum -{ - USTATE_INSIDE_TEXT, - USTATE_AFTER_AMPERSAND, - USTATE_INSIDE_ENTITY_NAME, - USTATE_AFTER_CHARREF_HASH -} UnescapeState; - -static gboolean -unescape_text (GMarkupParseContext *context, - const gchar *text, - const gchar *text_end, - gchar **unescaped, - GError **error) -{ -#define MAX_ENT_LEN 5 - GString *str; - const gchar *p; - UnescapeState state; - const gchar *start; - - str = g_string_new (""); - - state = USTATE_INSIDE_TEXT; - p = text; - start = p; - while (p != text_end && context->state != STATE_ERROR) - { - g_assert (p < text_end); - - switch (state) - { - case USTATE_INSIDE_TEXT: - { - while (p != text_end && *p != '&') - p = g_utf8_next_char (p); - - if (p != start) - { - g_string_append_len (str, start, p - start); - - start = NULL; - } - - if (p != text_end && *p == '&') - { - p = g_utf8_next_char (p); - state = USTATE_AFTER_AMPERSAND; - } - } - break; - - case USTATE_AFTER_AMPERSAND: - { - if (*p == '#') - { - p = g_utf8_next_char (p); - - start = p; - state = USTATE_AFTER_CHARREF_HASH; - } - else if (!is_name_start_char (g_utf8_get_char (p))) - { - if (*p == ';') - { - set_unescape_error (context, error, - p, text_end, - G_MARKUP_ERROR_PARSE, - _("Empty entity '&;' seen; valid " - "entities are: & " < > '")); - } - else - { - gchar buf[7]; - - set_unescape_error (context, error, - p, text_end, - G_MARKUP_ERROR_PARSE, - _("Character '%s' is not valid at " - "the start of an entity name; " - "the & character begins an entity; " - "if this ampersand isn't supposed " - "to be an entity, escape it as " - "&"), - utf8_str (p, buf)); - } - } - else - { - start = p; - state = USTATE_INSIDE_ENTITY_NAME; - } - } - break; - - - case USTATE_INSIDE_ENTITY_NAME: - { - gchar buf[MAX_ENT_LEN+1] = { - '\0', '\0', '\0', '\0', '\0', '\0' - }; - gchar *dest; - - while (p != text_end) - { - if (*p == ';') - break; - else if (!is_name_char (*p)) - { - gchar ubuf[7]; - - set_unescape_error (context, error, - p, text_end, - G_MARKUP_ERROR_PARSE, - _("Character '%s' is not valid " - "inside an entity name"), - utf8_str (p, ubuf)); - break; - } - - p = g_utf8_next_char (p); - } - - if (context->state != STATE_ERROR) - { - if (p != text_end) - { - const gchar *src; - - src = start; - dest = buf; - while (src != p) - { - *dest = *src; - ++dest; - ++src; - } - - /* move to after semicolon */ - p = g_utf8_next_char (p); - start = p; - state = USTATE_INSIDE_TEXT; - - if (strcmp (buf, "lt") == 0) - g_string_append_c (str, '<'); - else if (strcmp (buf, "gt") == 0) - g_string_append_c (str, '>'); - else if (strcmp (buf, "amp") == 0) - g_string_append_c (str, '&'); - else if (strcmp (buf, "quot") == 0) - g_string_append_c (str, '"'); - else if (strcmp (buf, "apos") == 0) - g_string_append_c (str, '\''); - else - { - set_unescape_error (context, error, - p, text_end, - G_MARKUP_ERROR_PARSE, - _("Entity name '%s' is not known"), - buf); - } - } - else - { - set_unescape_error (context, error, - /* give line number of the & */ - start, text_end, - G_MARKUP_ERROR_PARSE, - _("Entity did not end with a semicolon; " - "most likely you used an ampersand " - "character without intending to start " - "an entity - escape ampersand as &")); - } - } - } - break; - - case USTATE_AFTER_CHARREF_HASH: - { - gboolean is_hex = FALSE; - if (*p == 'x') - { - is_hex = TRUE; - p = g_utf8_next_char (p); - start = p; - } - - while (p != text_end && *p != ';') - p = g_utf8_next_char (p); - - if (p != text_end) - { - g_assert (*p == ';'); - - /* digit is between start and p */ - - if (start != p) - { - gchar *digit = g_strndup (start, p - start); - gulong l; - gchar *end = NULL; - gchar *digit_end = digit + (p - start); - - errno = 0; - if (is_hex) - l = strtoul (digit, &end, 16); - else - l = strtoul (digit, &end, 10); - - if (end != digit_end || errno != 0) - { - set_unescape_error (context, error, - start, text_end, - G_MARKUP_ERROR_PARSE, - _("Failed to parse '%s', which " - "should have been a digit " - "inside a character reference " - "(ê for example) - perhaps " - "the digit is too large"), - digit); - } - else - { - /* characters XML permits */ - if (l == 0x9 || - l == 0xA || - l == 0xD || - (l >= 0x20 && l <= 0xD7FF) || - (l >= 0xE000 && l <= 0xFFFD) || - (l >= 0x10000 && l <= 0x10FFFF)) - { - gchar buf[7]; - g_string_append (str, char_str (l, buf)); - } - else - { - set_unescape_error (context, error, - start, text_end, - G_MARKUP_ERROR_PARSE, - _("Character reference '%s' does not encode a permitted character"), - digit); - } - } - - g_free (digit); - - /* Move to next state */ - p = g_utf8_next_char (p); /* past semicolon */ - start = p; - state = USTATE_INSIDE_TEXT; - } - else - { - set_unescape_error (context, error, - start, text_end, - G_MARKUP_ERROR_PARSE, - _("Empty character reference; " - "should include a digit such as " - "dž")); - } - } - else - { - set_unescape_error (context, error, - start, text_end, - G_MARKUP_ERROR_PARSE, - _("Character reference did not end with a " - "semicolon; " - "most likely you used an ampersand " - "character without intending to start " - "an entity - escape ampersand as &")); - } - } - break; - - default: - g_assert_not_reached (); - break; - } - } - - /* If no errors, we should have returned to USTATE_INSIDE_TEXT */ - g_assert (context->state == STATE_ERROR || - state == USTATE_INSIDE_TEXT); - - if (context->state == STATE_ERROR) - { - g_string_free (str, TRUE); - *unescaped = NULL; - return FALSE; - } - else - { - *unescaped = g_string_free (str, FALSE); - return TRUE; - } - -#undef MAX_ENT_LEN -} - -static gboolean -advance_char (GMarkupParseContext *context) -{ - - context->iter = g_utf8_next_char (context->iter); - context->char_number += 1; - if (*context->iter == '\n') - { - context->line_number += 1; - context->char_number = 1; - } - - return context->iter != context->current_text_end; -} - -static void -skip_spaces (GMarkupParseContext *context) -{ - do - { - if (!g_unichar_isspace (g_utf8_get_char (context->iter))) - return; - } - while (advance_char (context)); -} - -static void -advance_to_name_end (GMarkupParseContext *context) -{ - do - { - if (!is_name_char (g_utf8_get_char (context->iter))) - return; - } - while (advance_char (context)); -} - -static void -add_to_partial (GMarkupParseContext *context, - const gchar *text_start, - const gchar *text_end) -{ - if (context->partial_chunk == NULL) - context->partial_chunk = g_string_new (""); - - if (text_start != text_end) - g_string_append_len (context->partial_chunk, text_start, - text_end - text_start); - - /* Invariant here that partial_chunk exists */ -} - -static void -truncate_partial (GMarkupParseContext *context) -{ - if (context->partial_chunk != NULL) - { - context->partial_chunk = g_string_truncate (context->partial_chunk, 0); - } -} - -static const gchar* -current_element (GMarkupParseContext *context) -{ - return context->tag_stack->data; -} - -static const gchar* -current_attribute (GMarkupParseContext *context) -{ - g_assert (context->cur_attr >= 0); - return context->attr_names[context->cur_attr]; -} - -static void -find_current_text_end (GMarkupParseContext *context) -{ - /* This function must be safe (non-segfaulting) on invalid UTF8 */ - const gchar *end = context->current_text + context->current_text_len; - const gchar *p; - const gchar *next; - - g_assert (context->current_text_len > 0); - - p = context->current_text; - next = g_utf8_find_next_char (p, end); - - while (next) - { - p = next; - next = g_utf8_find_next_char (p, end); - } - - /* p is now the start of the last character or character portion. */ - g_assert (p != end); - next = g_utf8_next_char (p); /* this only touches *p, nothing beyond */ - - if (next == end) - { - /* whole character */ - context->current_text_end = end; - } - else - { - /* portion */ - context->leftover_char_portion = g_string_new_len (p, end - p); - context->current_text_len -= (end - p); - context->current_text_end = p; - } -} - -static void -add_attribute (GMarkupParseContext *context, char *name) -{ - if (context->cur_attr + 2 >= context->alloc_attrs) - { - context->alloc_attrs += 5; /* silly magic number */ - context->attr_names = g_realloc (context->attr_names, sizeof(char*)*context->alloc_attrs); - context->attr_values = g_realloc (context->attr_values, sizeof(char*)*context->alloc_attrs); - } - context->cur_attr++; - context->attr_names[context->cur_attr] = name; - context->attr_values[context->cur_attr] = NULL; - context->attr_names[context->cur_attr+1] = NULL; -} - -/** - * g_markup_parse_context_parse: - * @context: a #GMarkupParseContext - * @text: chunk of text to parse - * @text_len: length of @text in bytes - * @error: return location for a #GError - * - * Feed some data to the #GMarkupParseContext. The data need not - * be valid UTF-8; an error will be signaled if it's invalid. - * The data need not be an entire document; you can feed a document - * into the parser incrementally, via multiple calls to this function. - * Typically, as you receive data from a network connection or file, - * you feed each received chunk of data into this function, aborting - * the process if an error occurs. Once an error is reported, no further - * data may be fed to the #GMarkupParseContext; all errors are fatal. - * - * Return value: %FALSE if an error occurred, %TRUE on success - **/ -gboolean -g_markup_parse_context_parse (GMarkupParseContext *context, - const gchar *text, - gssize text_len, - GError **error) -{ - const gchar *first_invalid; - - g_return_val_if_fail (context != NULL, FALSE); - g_return_val_if_fail (text != NULL, FALSE); - g_return_val_if_fail (context->state != STATE_ERROR, FALSE); - g_return_val_if_fail (!context->parsing, FALSE); - - if (text_len < 0) - text_len = strlen (text); - - if (text_len == 0) - return TRUE; - - context->parsing = TRUE; - - if (context->leftover_char_portion) - { - const gchar *first_char; - - if ((*text & 0xc0) != 0x80) - first_char = text; - else - first_char = g_utf8_find_next_char (text, text + text_len); - - if (first_char) - { - /* leftover_char_portion was completed. Parse it. */ - GString *portion = context->leftover_char_portion; - - g_string_append_len (context->leftover_char_portion, - text, first_char - text); - - /* hacks to allow recursion */ - context->parsing = FALSE; - context->leftover_char_portion = NULL; - - if (!g_markup_parse_context_parse (context, - portion->str, portion->len, - error)) - { - g_assert (context->state == STATE_ERROR); - } - - g_string_free (portion, TRUE); - context->parsing = TRUE; - - /* Skip the fraction of char that was in this text */ - text_len -= (first_char - text); - text = first_char; - } - else - { - /* another little chunk of the leftover char; geez - * someone is inefficient. - */ - g_string_append_len (context->leftover_char_portion, - text, text_len); - - if (context->leftover_char_portion->len > 7) - { - /* The leftover char portion is too big to be - * a UTF-8 character - */ - set_error (context, - error, - G_MARKUP_ERROR_BAD_UTF8, - _("Invalid UTF-8 encoded text")); - } - - goto finished; - } - } - - context->current_text = text; - context->current_text_len = text_len; - context->iter = context->current_text; - context->start = context->iter; - - /* Nothing left after finishing the leftover char, or nothing - * passed in to begin with. - */ - if (context->current_text_len == 0) - goto finished; - - /* find_current_text_end () assumes the string starts at - * a character start, so we need to validate at least - * that much. It doesn't assume any following bytes - * are valid. - */ - if ((*context->current_text & 0xc0) == 0x80) /* not a char start */ - { - set_error (context, - error, - G_MARKUP_ERROR_BAD_UTF8, - _("Invalid UTF-8 encoded text")); - goto finished; - } - - /* Initialize context->current_text_end, possibly adjusting - * current_text_len, and add any leftover char portion - */ - find_current_text_end (context); - - /* Validate UTF8 (must be done after we find the end, since - * we could have a trailing incomplete char) - */ - if (!g_utf8_validate (context->current_text, - context->current_text_len, - &first_invalid)) - { - gint newlines = 0; - const gchar *p; - p = context->current_text; - while (p != context->current_text_end) - { - if (*p == '\n') - ++newlines; - ++p; - } - - context->line_number += newlines; - - set_error (context, - error, - G_MARKUP_ERROR_BAD_UTF8, - _("Invalid UTF-8 encoded text")); - goto finished; - } - - while (context->iter != context->current_text_end) - { - switch (context->state) - { - case STATE_START: - /* Possible next state: AFTER_OPEN_ANGLE */ - - g_assert (context->tag_stack == NULL); - - /* whitespace is ignored outside of any elements */ - skip_spaces (context); - - if (context->iter != context->current_text_end) - { - if (*context->iter == '<') - { - /* Move after the open angle */ - advance_char (context); - - context->state = STATE_AFTER_OPEN_ANGLE; - - /* this could start a passthrough */ - context->start = context->iter; - - /* document is now non-empty */ - context->document_empty = FALSE; - } - else - { - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("Document must begin with an element (e.g. <book>)")); - } - } - break; - - case STATE_AFTER_OPEN_ANGLE: - /* Possible next states: INSIDE_OPEN_TAG_NAME, - * AFTER_CLOSE_TAG_SLASH, INSIDE_PASSTHROUGH - */ - if (*context->iter == '?' || - *context->iter == '!') - { - /* include < in the passthrough */ - const gchar *openangle = "<"; - add_to_partial (context, openangle, openangle + 1); - context->start = context->iter; - context->state = STATE_INSIDE_PASSTHROUGH; - } - else if (*context->iter == '/') - { - /* move after it */ - advance_char (context); - - context->state = STATE_AFTER_CLOSE_TAG_SLASH; - } - else if (is_name_start_char (g_utf8_get_char (context->iter))) - { - context->state = STATE_INSIDE_OPEN_TAG_NAME; - - /* start of tag name */ - context->start = context->iter; - } - else - { - gchar buf[7]; - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("'%s' is not a valid character following " - "a '<' character; it may not begin an " - "element name"), - utf8_str (context->iter, buf)); - } - break; - - /* The AFTER_CLOSE_ANGLE state is actually sort of - * broken, because it doesn't correspond to a range - * of characters in the input stream as the others do, - * and thus makes things harder to conceptualize - */ - case STATE_AFTER_CLOSE_ANGLE: - /* Possible next states: INSIDE_TEXT, STATE_START */ - if (context->tag_stack == NULL) - { - context->start = NULL; - context->state = STATE_START; - } - else - { - context->start = context->iter; - context->state = STATE_INSIDE_TEXT; - } - break; - - case STATE_AFTER_ELISION_SLASH: - /* Possible next state: AFTER_CLOSE_ANGLE */ - - { - /* We need to pop the tag stack and call the end_element - * function, since this is the close tag - */ - GError *tmp_error = NULL; - - g_assert (context->tag_stack != NULL); - - tmp_error = NULL; - if (context->parser->end_element) - (* context->parser->end_element) (context, - context->tag_stack->data, - context->user_data, - &tmp_error); - - if (tmp_error) - { - mark_error (context, tmp_error); - g_propagate_error (error, tmp_error); - } - else - { - if (*context->iter == '>') - { - /* move after the close angle */ - advance_char (context); - context->state = STATE_AFTER_CLOSE_ANGLE; - } - else - { - gchar buf[7]; - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("Odd character '%s', expected a '>' character " - "to end the start tag of element '%s'"), - utf8_str (context->iter, buf), - current_element (context)); - } - } - - g_free (context->tag_stack->data); - context->tag_stack = g_slist_delete_link (context->tag_stack, - context->tag_stack); - } - break; - - case STATE_INSIDE_OPEN_TAG_NAME: - /* Possible next states: BETWEEN_ATTRIBUTES */ - - /* if there's a partial chunk then it's the first part of the - * tag name. If there's a context->start then it's the start - * of the tag name in current_text, the partial chunk goes - * before that start though. - */ - advance_to_name_end (context); - - if (context->iter == context->current_text_end) - { - /* The name hasn't necessarily ended. Merge with - * partial chunk, leave state unchanged. - */ - add_to_partial (context, context->start, context->iter); - } - else - { - /* The name has ended. Combine it with the partial chunk - * if any; push it on the stack; enter next state. - */ - add_to_partial (context, context->start, context->iter); - context->tag_stack = - g_slist_prepend (context->tag_stack, - g_string_free (context->partial_chunk, - FALSE)); - - context->partial_chunk = NULL; - - context->state = STATE_BETWEEN_ATTRIBUTES; - context->start = NULL; - } - break; - - case STATE_INSIDE_ATTRIBUTE_NAME: - /* Possible next states: AFTER_ATTRIBUTE_EQUALS_SIGN */ - - /* read the full name, if we enter the equals sign state - * then add the attribute to the list (without the value), - * otherwise store a partial chunk to be prepended later. - */ - advance_to_name_end (context); - - if (context->iter == context->current_text_end) - { - /* The name hasn't necessarily ended. Merge with - * partial chunk, leave state unchanged. - */ - add_to_partial (context, context->start, context->iter); - } - else - { - /* The name has ended. Combine it with the partial chunk - * if any; push it on the stack; enter next state. - */ - add_to_partial (context, context->start, context->iter); - - add_attribute (context, g_string_free (context->partial_chunk, FALSE)); - - context->partial_chunk = NULL; - context->start = NULL; - - if (*context->iter == '=') - { - advance_char (context); - context->state = STATE_AFTER_ATTRIBUTE_EQUALS_SIGN; - } - else - { - gchar buf[7]; - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("Odd character '%s', expected a '=' after " - "attribute name '%s' of element '%s'"), - utf8_str (context->iter, buf), - current_attribute (context), - current_element (context)); - - } - } - break; - - case STATE_BETWEEN_ATTRIBUTES: - /* Possible next states: AFTER_CLOSE_ANGLE, - * AFTER_ELISION_SLASH, INSIDE_ATTRIBUTE_NAME - */ - skip_spaces (context); - - if (context->iter != context->current_text_end) - { - if (*context->iter == '/') - { - advance_char (context); - context->state = STATE_AFTER_ELISION_SLASH; - } - else if (*context->iter == '>') - { - - advance_char (context); - context->state = STATE_AFTER_CLOSE_ANGLE; - } - else if (is_name_start_char (g_utf8_get_char (context->iter))) - { - context->state = STATE_INSIDE_ATTRIBUTE_NAME; - /* start of attribute name */ - context->start = context->iter; - } - else - { - gchar buf[7]; - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("Odd character '%s', expected a '>' or '/' " - "character to end the start tag of " - "element '%s', or optionally an attribute; " - "perhaps you used an invalid character in " - "an attribute name"), - utf8_str (context->iter, buf), - current_element (context)); - } - - /* If we're done with attributes, invoke - * the start_element callback - */ - if (context->state == STATE_AFTER_ELISION_SLASH || - context->state == STATE_AFTER_CLOSE_ANGLE) - { - const gchar *start_name; - /* Ugly, but the current code expects an empty array instead of NULL */ - const gchar *empty = NULL; - const gchar **attr_names = ∅ - const gchar **attr_values = ∅ - GError *tmp_error; - - /* Call user callback for element start */ - start_name = current_element (context); - - if (context->cur_attr >= 0) - { - attr_names = (const gchar**)context->attr_names; - attr_values = (const gchar**)context->attr_values; - } - - tmp_error = NULL; - if (context->parser->start_element) - (* context->parser->start_element) (context, - start_name, - (const gchar **)attr_names, - (const gchar **)attr_values, - context->user_data, - &tmp_error); - - /* Go ahead and free the attributes. */ - for (; context->cur_attr >= 0; context->cur_attr--) - { - int pos = context->cur_attr; - g_free (context->attr_names[pos]); - g_free (context->attr_values[pos]); - context->attr_names[pos] = context->attr_values[pos] = NULL; - } - context->cur_attr = -1; - - if (tmp_error != NULL) - { - mark_error (context, tmp_error); - g_propagate_error (error, tmp_error); - } - } - } - break; - - case STATE_AFTER_ATTRIBUTE_EQUALS_SIGN: - /* Possible next state: INSIDE_ATTRIBUTE_VALUE */ - if (*context->iter == '"') - { - advance_char (context); - context->state = STATE_INSIDE_ATTRIBUTE_VALUE; - context->start = context->iter; - } - else - { - gchar buf[7]; - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("Odd character '%s', expected an open quote mark " - "after the equals sign when giving value for " - "attribute '%s' of element '%s'"), - utf8_str (context->iter, buf), - current_attribute (context), - current_element (context)); - } - break; - - case STATE_INSIDE_ATTRIBUTE_VALUE: - /* Possible next states: BETWEEN_ATTRIBUTES */ - do - { - if (*context->iter == '"') - break; - } - while (advance_char (context)); - - if (context->iter == context->current_text_end) - { - /* The value hasn't necessarily ended. Merge with - * partial chunk, leave state unchanged. - */ - add_to_partial (context, context->start, context->iter); - } - else - { - /* The value has ended at the quote mark. Combine it - * with the partial chunk if any; set it for the current - * attribute. - */ - add_to_partial (context, context->start, context->iter); - - g_assert (context->cur_attr >= 0); - - if (unescape_text (context, - context->partial_chunk->str, - context->partial_chunk->str + - context->partial_chunk->len, - &context->attr_values[context->cur_attr], - error)) - { - /* success, advance past quote and set state. */ - advance_char (context); - context->state = STATE_BETWEEN_ATTRIBUTES; - context->start = NULL; - } - - truncate_partial (context); - } - break; - - case STATE_INSIDE_TEXT: - /* Possible next states: AFTER_OPEN_ANGLE */ - do - { - if (*context->iter == '<') - break; - } - while (advance_char (context)); - - /* The text hasn't necessarily ended. Merge with - * partial chunk, leave state unchanged. - */ - - add_to_partial (context, context->start, context->iter); - - if (context->iter != context->current_text_end) - { - gchar *unescaped = NULL; - - /* The text has ended at the open angle. Call the text - * callback. - */ - - if (unescape_text (context, - context->partial_chunk->str, - context->partial_chunk->str + - context->partial_chunk->len, - &unescaped, - error)) - { - GError *tmp_error = NULL; - - if (context->parser->text) - (*context->parser->text) (context, - unescaped, - strlen (unescaped), - context->user_data, - &tmp_error); - - g_free (unescaped); - - if (tmp_error == NULL) - { - /* advance past open angle and set state. */ - advance_char (context); - context->state = STATE_AFTER_OPEN_ANGLE; - /* could begin a passthrough */ - context->start = context->iter; - } - else - { - mark_error (context, tmp_error); - g_propagate_error (error, tmp_error); - } - } - - truncate_partial (context); - } - break; - - case STATE_AFTER_CLOSE_TAG_SLASH: - /* Possible next state: INSIDE_CLOSE_TAG_NAME */ - if (is_name_start_char (g_utf8_get_char (context->iter))) - { - context->state = STATE_INSIDE_CLOSE_TAG_NAME; - - /* start of tag name */ - context->start = context->iter; - } - else - { - gchar buf[7]; - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("'%s' is not a valid character following " - "the characters '</'; '%s' may not begin an " - "element name"), - utf8_str (context->iter, buf), - utf8_str (context->iter, buf)); - } - break; - - case STATE_INSIDE_CLOSE_TAG_NAME: - /* Possible next state: AFTER_CLOSE_ANGLE */ - advance_to_name_end (context); - - if (context->iter == context->current_text_end) - { - /* The name hasn't necessarily ended. Merge with - * partial chunk, leave state unchanged. - */ - add_to_partial (context, context->start, context->iter); - } - else - { - /* The name has ended. Combine it with the partial chunk - * if any; check that it matches stack top and pop - * stack; invoke proper callback; enter next state. - */ - gchar *close_name; - - add_to_partial (context, context->start, context->iter); - - close_name = g_string_free (context->partial_chunk, FALSE); - context->partial_chunk = NULL; - - if (context->tag_stack == NULL) - { - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("Element '%s' was closed, no element " - "is currently open"), - close_name); - } - else if (strcmp (close_name, current_element (context)) != 0) - { - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("Element '%s' was closed, but the currently " - "open element is '%s'"), - close_name, - current_element (context)); - } - else if (*context->iter != '>') - { - gchar buf[7]; - set_error (context, - error, - G_MARKUP_ERROR_PARSE, - _("'%s' is not a valid character following " - "the close element name '%s'; the allowed " - "character is '>'"), - utf8_str (context->iter, buf), - close_name); - } - else - { - GError *tmp_error; - advance_char (context); - context->state = STATE_AFTER_CLOSE_ANGLE; - context->start = NULL; - - /* call the end_element callback */ - tmp_error = NULL; - if (context->parser->end_element) - (* context->parser->end_element) (context, - close_name, - context->user_data, - &tmp_error); - - - /* Pop the tag stack */ - g_free (context->tag_stack->data); - context->tag_stack = g_slist_delete_link (context->tag_stack, - context->tag_stack); - - if (tmp_error) - { - mark_error (context, tmp_error); - g_propagate_error (error, tmp_error); - } - } - - g_free (close_name); - } - break; - - case STATE_INSIDE_PASSTHROUGH: - /* Possible next state: AFTER_CLOSE_ANGLE */ - do - { - if (*context->iter == '>') - break; - } - while (advance_char (context)); - - if (context->iter == context->current_text_end) - { - /* The passthrough hasn't necessarily ended. Merge with - * partial chunk, leave state unchanged. - */ - add_to_partial (context, context->start, context->iter); - } - else - { - /* The passthrough has ended at the close angle. Combine - * it with the partial chunk if any. Call the passthrough - * callback. Note that the open/close angles are - * included in the text of the passthrough. - */ - GError *tmp_error = NULL; - - advance_char (context); /* advance past close angle */ - add_to_partial (context, context->start, context->iter); - - if (context->parser->passthrough) - (*context->parser->passthrough) (context, - context->partial_chunk->str, - context->partial_chunk->len, - context->user_data, - &tmp_error); - - truncate_partial (context); - - if (tmp_error == NULL) - { - context->state = STATE_AFTER_CLOSE_ANGLE; - context->start = context->iter; /* could begin text */ - } - else - { - mark_error (context, tmp_error); - g_propagate_error (error, tmp_error); - } - } - break; - - case STATE_ERROR: - goto finished; - break; - - default: - g_assert_not_reached (); - break; - } - } - - finished: - context->parsing = FALSE; - - return context->state != STATE_ERROR; -} - -/** - * g_markup_parse_context_end_parse: - * @context: a #GMarkupParseContext - * @error: return location for a #GError - * - * Signals to the #GMarkupParseContext that all data has been - * fed into the parse context with g_markup_parse_context_parse(). - * This function reports an error if the document isn't complete, - * for example if elements are still open. - * - * Return value: %TRUE on success, %FALSE if an error was set - **/ -gboolean -g_markup_parse_context_end_parse (GMarkupParseContext *context, - GError **error) -{ - g_return_val_if_fail (context != NULL, FALSE); - g_return_val_if_fail (!context->parsing, FALSE); - g_return_val_if_fail (context->state != STATE_ERROR, FALSE); - - if (context->partial_chunk != NULL) - { - g_string_free (context->partial_chunk, TRUE); - context->partial_chunk = NULL; - } - - if (context->document_empty) - { - set_error (context, error, G_MARKUP_ERROR_EMPTY, - _("Document was empty or contained only whitespace")); - return FALSE; - } - - context->parsing = TRUE; - - switch (context->state) - { - case STATE_START: - /* Nothing to do */ - break; - - case STATE_AFTER_OPEN_ANGLE: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly just after an open angle bracket '<'")); - break; - - case STATE_AFTER_CLOSE_ANGLE: - if (context->tag_stack != NULL) - { - /* Error message the same as for INSIDE_TEXT */ - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly with elements still open - " - "'%s' was the last element opened"), - current_element (context)); - } - break; - - case STATE_AFTER_ELISION_SLASH: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly, expected to see a close angle " - "bracket ending the tag <%s/>"), current_element (context)); - break; - - case STATE_INSIDE_OPEN_TAG_NAME: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly inside an element name")); - break; - - case STATE_INSIDE_ATTRIBUTE_NAME: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly inside an attribute name")); - break; - - case STATE_BETWEEN_ATTRIBUTES: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly inside an element-opening " - "tag.")); - break; - - case STATE_AFTER_ATTRIBUTE_EQUALS_SIGN: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly after the equals sign " - "following an attribute name; no attribute value")); - break; - - case STATE_INSIDE_ATTRIBUTE_VALUE: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly while inside an attribute " - "value")); - break; - - case STATE_INSIDE_TEXT: - g_assert (context->tag_stack != NULL); - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly with elements still open - " - "'%s' was the last element opened"), - current_element (context)); - break; - - case STATE_AFTER_CLOSE_TAG_SLASH: - case STATE_INSIDE_CLOSE_TAG_NAME: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly inside the close tag for" - "element '%s'"), current_element); - break; - - case STATE_INSIDE_PASSTHROUGH: - set_error (context, error, G_MARKUP_ERROR_PARSE, - _("Document ended unexpectedly inside a comment or " - "processing instruction")); - break; - - case STATE_ERROR: - default: - g_assert_not_reached (); - break; - } - - context->parsing = FALSE; - - return context->state != STATE_ERROR; -} - -/** - * g_markup_parse_context_get_position: - * @context: a #GMarkupParseContext - * @line_number: return location for a line number, or %NULL - * @char_number: return location for a char-on-line number, or %NULL - * - * Retrieves the current line number and the number of the character on - * that line. Intended for use in error messages; there are no strict - * semantics for what constitutes the "current" line number other than - * "the best number we could come up with for error messages." - * - **/ -void -g_markup_parse_context_get_position (GMarkupParseContext *context, - gint *line_number, - gint *char_number) -{ - g_return_if_fail (context != NULL); - - if (line_number) - *line_number = context->line_number; - - if (char_number) - *char_number = context->char_number; -} - -static void -append_escaped_text (GString *str, - const gchar *text, - gssize length) -{ - const gchar *p; - const gchar *end; - - p = text; - end = text + length; - - while (p != end) - { - const gchar *next; - next = g_utf8_next_char (p); - - switch (*p) - { - case '&': - g_string_append (str, "&"); - break; - - case '<': - g_string_append (str, "<"); - break; - - case '>': - g_string_append (str, ">"); - break; - - case '\'': - g_string_append (str, "'"); - break; - - case '"': - g_string_append (str, """); - break; - - default: - g_string_append_len (str, p, next - p); - break; - } - - p = next; - } -} - -/** - * g_markup_escape_text: - * @text: some valid UTF-8 text - * @length: length of @text in bytes - * - * Escapes text so that the markup parser will parse it verbatim. - * Less than, greater than, ampersand, etc. are replaced with the - * corresponding entities. This function would typically be used - * when writing out a file to be parsed with the markup parser. - * - * Return value: escaped text - **/ -gchar* -g_markup_escape_text (const gchar *text, - gssize length) -{ - GString *str; - - g_return_val_if_fail (text != NULL, NULL); - - if (length < 0) - length = strlen (text); - - str = g_string_new (""); - append_escaped_text (str, text, length); - - return g_string_free (str, FALSE); -} diff --git a/gmarkup.h b/gmarkup.h deleted file mode 100644 index 32de22c2c..000000000 --- a/gmarkup.h +++ /dev/null @@ -1,123 +0,0 @@ -/* gmarkup.h - Simple XML-like string parser/writer - * - * Copyright 2000 Red Hat, Inc. - * - * GLib is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __G_MARKUP_H__ -#define __G_MARKUP_H__ - -#include <gerror.h> - -G_BEGIN_DECLS - -typedef enum -{ - G_MARKUP_ERROR_BAD_UTF8, - G_MARKUP_ERROR_EMPTY, - G_MARKUP_ERROR_PARSE, - /* These three are primarily intended for specific GMarkupParser - * implementations to set. - */ - G_MARKUP_ERROR_UNKNOWN_ELEMENT, - G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, - G_MARKUP_ERROR_INVALID_CONTENT -} GMarkupError; - -#define G_MARKUP_ERROR g_markup_error_quark () - -GQuark g_markup_error_quark (); - -typedef enum -{ - /* Hmm, can't think of any at the moment */ - G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0 - -} GMarkupParseFlags; - -typedef struct _GMarkupParseContext GMarkupParseContext; -typedef struct _GMarkupParser GMarkupParser; - -struct _GMarkupParser -{ - /* Called for open tags <foo bar="baz"> */ - void (*start_element) (GMarkupParseContext *context, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, - gpointer user_data, - GError **error); - - /* Called for close tags </foo> */ - void (*end_element) (GMarkupParseContext *context, - const gchar *element_name, - gpointer user_data, - GError **error); - - /* Called for character data */ - /* text is not nul-terminated */ - void (*text) (GMarkupParseContext *context, - const gchar *text, - gsize text_len, - gpointer user_data, - GError **error); - - /* Called for strings that should be re-saved verbatim in this same - * position, but are not otherwise interpretable. At the moment - * this includes comments and processing instructions. - */ - /* text is not nul-terminated. */ - void (*passthrough) (GMarkupParseContext *context, - const gchar *passthrough_text, - gsize text_len, - gpointer user_data, - GError **error); - - /* Called on error, including one set by other - * methods in the vtable. The GError should not be freed. - */ - void (*error) (GMarkupParseContext *context, - GError *error, - gpointer user_data); -}; - -GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, - GMarkupParseFlags flags, - gpointer user_data, - GDestroyNotify user_data_dnotify); -void g_markup_parse_context_free (GMarkupParseContext *context); -gboolean g_markup_parse_context_parse (GMarkupParseContext *context, - const gchar *text, - gssize text_len, - GError **error); - -gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, - GError **error); - -/* For user-constructed error messages, has no precise semantics */ -void g_markup_parse_context_get_position (GMarkupParseContext *context, - gint *line_number, - gint *char_number); - -/* useful when saving */ -gchar* g_markup_escape_text (const gchar *text, - gssize length); - -G_END_DECLS - -#endif /* __G_MARKUP_H__ */ - diff --git a/gmem.c b/gmem.c deleted file mode 100644 index 616614b9e..000000000 --- a/gmem.c +++ /dev/null @@ -1,1263 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdlib.h> -#include <string.h> -#include "glib.h" - - -/* notes on macros: - * having DISABLE_MEM_POOLS defined, disables mem_chunks alltogether, their - * allocations are performed through ordinary g_malloc/g_free. - * having G_DISABLE_CHECKS defined disables use of glib_mem_profiler_table and - * g_mem_profile(). - * REALLOC_0_WORKS is defined if g_realloc (NULL, x) works. - * SANE_MALLOC_PROTOS is defined if the systems malloc() and friends functions - * match the corresponding GLib prototypes, keep configure.in and gmem.h in sync here. - * if ENABLE_GC_FRIENDLY is defined, freed memory should be 0-wiped. - */ - -#define MEM_PROFILE_TABLE_SIZE 4096 - -#define MEM_AREA_SIZE 4L - -#ifdef G_DISABLE_CHECKS -# define ENTER_MEM_CHUNK_ROUTINE() -# define LEAVE_MEM_CHUNK_ROUTINE() -# define IN_MEM_CHUNK_ROUTINE() FALSE -#else /* !G_DISABLE_CHECKS */ -static GPrivate* mem_chunk_recursion = NULL; -# define MEM_CHUNK_ROUTINE_COUNT() GPOINTER_TO_UINT (g_private_get (mem_chunk_recursion)) -# define ENTER_MEM_CHUNK_ROUTINE() g_private_set (mem_chunk_recursion, GUINT_TO_POINTER (MEM_CHUNK_ROUTINE_COUNT () + 1)) -# define LEAVE_MEM_CHUNK_ROUTINE() g_private_set (mem_chunk_recursion, GUINT_TO_POINTER (MEM_CHUNK_ROUTINE_COUNT () - 1)) -#endif /* !G_DISABLE_CHECKS */ - -#ifndef REALLOC_0_WORKS -static gpointer -standard_realloc (gpointer mem, - gsize n_bytes) -{ - if (!mem) - return malloc (n_bytes); - else - return realloc (mem, n_bytes); -} -#endif /* !REALLOC_0_WORKS */ - -#ifdef SANE_MALLOC_PROTOS -# define standard_malloc malloc -# ifdef REALLOC_0_WORKS -# define standard_realloc realloc -# endif /* REALLOC_0_WORKS */ -# define standard_free free -# define standard_calloc calloc -# define standard_try_malloc malloc -# define standard_try_realloc realloc -#else /* !SANE_MALLOC_PROTOS */ -static gpointer -standard_malloc (gsize n_bytes) -{ - return malloc (n_bytes); -} -# ifdef REALLOC_0_WORKS -static gpointer -standard_realloc (gpointer mem, - gsize n_bytes) -{ - return realloc (mem, n_bytes); -} -# endif /* REALLOC_0_WORKS */ -static void -standard_free (gpointer mem) -{ - free (mem); -} -static gpointer -standard_calloc (gsize n_blocks, - gsize n_bytes) -{ - return calloc (n_blocks, n_bytes); -} -#define standard_try_malloc standard_malloc -#define standard_try_realloc standard_realloc -#endif /* !SANE_MALLOC_PROTOS */ - - -/* --- variables --- */ -static GMemVTable glib_mem_vtable = { - standard_malloc, - standard_realloc, - standard_free, - standard_calloc, - standard_try_malloc, - standard_try_realloc, -}; - - -/* --- functions --- */ -gpointer -g_malloc (gulong n_bytes) -{ - if (n_bytes) - { - gpointer mem; - - mem = glib_mem_vtable.malloc (n_bytes); - if (mem) - return mem; - - g_error ("%s: failed to allocate %lu bytes", G_STRLOC, n_bytes); - } - - return NULL; -} - -gpointer -g_malloc0 (gulong n_bytes) -{ - if (n_bytes) - { - gpointer mem; - - mem = glib_mem_vtable.calloc (1, n_bytes); - if (mem) - return mem; - - g_error ("%s: failed to allocate %lu bytes", G_STRLOC, n_bytes); - } - - return NULL; -} - -gpointer -g_realloc (gpointer mem, - gulong n_bytes) -{ - if (n_bytes) - { - mem = glib_mem_vtable.realloc (mem, n_bytes); - if (mem) - return mem; - - g_error ("%s: failed to allocate %lu bytes", G_STRLOC, n_bytes); - } - - if (mem) - glib_mem_vtable.free (mem); - - return NULL; -} - -void -g_free (gpointer mem) -{ - if (mem) - glib_mem_vtable.free (mem); -} - -gpointer -g_try_malloc (gulong n_bytes) -{ - if (n_bytes) - return glib_mem_vtable.try_malloc (n_bytes); - else - return NULL; -} - -gpointer -g_try_realloc (gpointer mem, - gulong n_bytes) -{ - if (n_bytes) - return glib_mem_vtable.try_realloc (mem, n_bytes); - - if (mem) - glib_mem_vtable.free (mem); - - return NULL; -} - -static gpointer -fallback_calloc (gsize n_blocks, - gsize n_block_bytes) -{ - gsize l = n_blocks * n_block_bytes; - gpointer mem = glib_mem_vtable.malloc (l); - - if (mem) - memset (mem, 0, l); - - return mem; -} - -void -g_mem_set_vtable (GMemVTable *vtable) -{ - gboolean vtable_set = FALSE; - - if (!vtable_set) - { - vtable_set |= TRUE; - if (vtable->malloc && vtable->realloc && vtable->free) - { - glib_mem_vtable.malloc = vtable->malloc; - glib_mem_vtable.realloc = vtable->realloc; - glib_mem_vtable.free = vtable->free; - glib_mem_vtable.calloc = vtable->calloc ? vtable->calloc : fallback_calloc; - glib_mem_vtable.try_malloc = vtable->try_malloc ? vtable->try_malloc : glib_mem_vtable.malloc; - glib_mem_vtable.try_realloc = vtable->try_realloc ? vtable->try_realloc : glib_mem_vtable.realloc; - } - else - g_warning (G_STRLOC ": memory allocation vtable lacks one of malloc(), realloc() or free()"); - } - else - g_warning (G_STRLOC ": memory allocation vtable can only be set once at startup"); -} - - -/* --- memory profiling and checking --- */ -#ifdef G_DISABLE_CHECKS -GMemVTable *glib_mem_profiler_table = &glib_mem_vtable; -void -g_mem_profile (void) -{ -} -#else /* !G_DISABLE_CHECKS */ -typedef enum { - PROFILER_FREE = 0, - PROFILER_ALLOC = 1, - PROFILER_RELOC = 2, - PROFILER_ZINIT = 4 -} ProfilerJob; -static guint *profile_data = NULL; -static gulong profile_allocs = 0; -static gulong profile_mc_allocs = 0; -static gulong profile_zinit = 0; -static gulong profile_frees = 0; -static gulong profile_mc_frees = 0; -static GMutex *g_profile_mutex = NULL; -#ifdef G_ENABLE_DEBUG -static volatile gulong g_trap_free_size = 0; -static volatile gulong g_trap_realloc_size = 0; -static volatile gulong g_trap_malloc_size = 0; -#endif /* G_ENABLE_DEBUG */ - -#define PROFILE_TABLE(f1,f2,f3) ( ( ((f3) << 2) | ((f2) << 1) | (f1) ) * (MEM_PROFILE_TABLE_SIZE + 1)) - -static void -profiler_log (ProfilerJob job, - gulong n_bytes, - gboolean success) -{ - g_mutex_lock (g_profile_mutex); - if (!profile_data) - { - profile_data = standard_malloc ((MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0])); - if (!profile_data) /* memory system kiddin' me, eh? */ - { - g_mutex_unlock (g_profile_mutex); - return; - } - } - - if (MEM_CHUNK_ROUTINE_COUNT () == 0) - { - if (n_bytes < MEM_PROFILE_TABLE_SIZE) - profile_data[n_bytes + PROFILE_TABLE ((job & PROFILER_ALLOC) != 0, - (job & PROFILER_RELOC) != 0, - success != 0)] += 1; - else - profile_data[MEM_PROFILE_TABLE_SIZE + PROFILE_TABLE ((job & PROFILER_ALLOC) != 0, - (job & PROFILER_RELOC) != 0, - success != 0)] += 1; - if (success) - { - if (job & PROFILER_ALLOC) - { - profile_allocs += n_bytes; - if (job & PROFILER_ZINIT) - profile_zinit += n_bytes; - } - else - profile_frees += n_bytes; - } - } - else if (success) - { - if (job & PROFILER_ALLOC) - profile_mc_allocs += n_bytes; - else - profile_mc_frees += n_bytes; - } - g_mutex_unlock (g_profile_mutex); -} - -static void -profile_print_locked (guint *local_data, - gboolean success) -{ - gboolean need_header = TRUE; - guint i; - - for (i = 0; i <= MEM_PROFILE_TABLE_SIZE; i++) - { - glong t_malloc = local_data[i + PROFILE_TABLE (1, 0, success)]; - glong t_realloc = local_data[i + PROFILE_TABLE (1, 1, success)]; - glong t_free = local_data[i + PROFILE_TABLE (0, 0, success)]; - glong t_refree = local_data[i + PROFILE_TABLE (0, 1, success)]; - - if (!t_malloc && !t_realloc && !t_free && !t_refree) - continue; - else if (need_header) - { - need_header = FALSE; - g_print (" blocks of | allocated | freed | allocated | freed | n_bytes \n"); - g_print (" n_bytes | n_times by | n_times by | n_times by | n_times by | remaining \n"); - g_print (" | malloc() | free() | realloc() | realloc() | \n"); - g_print ("===========|============|============|============|============|===========\n"); - } - if (i < MEM_PROFILE_TABLE_SIZE) - g_print ("%10u | %10ld | %10ld | %10ld | %10ld |%+11ld\n", - i, t_malloc, t_free, t_realloc, t_refree, - (t_malloc - t_free + t_realloc - t_refree) * i); - else if (i >= MEM_PROFILE_TABLE_SIZE) - g_print (" >%6u | %10ld | %10ld | %10ld | %10ld | ***\n", - i, t_malloc, t_free, t_realloc, t_refree); - } - if (need_header) - g_print (" --- none ---\n"); -} - -void -g_mem_profile (void) -{ - guint local_data[(MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0])]; - gulong local_allocs; - gulong local_zinit; - gulong local_frees; - gulong local_mc_allocs; - gulong local_mc_frees; - - g_mutex_lock (g_profile_mutex); - - local_allocs = profile_allocs; - local_zinit = profile_zinit; - local_frees = profile_frees; - local_mc_allocs = profile_mc_allocs; - local_mc_frees = profile_mc_frees; - - if (!profile_data) - { - g_mutex_unlock (g_profile_mutex); - return; - } - - memcpy (local_data, profile_data, - (MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0])); - - g_mutex_unlock (g_profile_mutex); - - g_print ("GLib Memory statistics (successful operations):\n"); - profile_print_locked (local_data, TRUE); - g_print ("GLib Memory statistics (failing operations):\n"); - profile_print_locked (local_data, FALSE); - g_print ("Total bytes: allocated=%lu, zero-initialized=%lu (%.2f%%), freed=%lu (%.2f%%), remaining=%lu\n", - local_allocs, - local_zinit, - ((gdouble) local_zinit) / local_allocs * 100.0, - local_frees, - ((gdouble) local_frees) / local_allocs * 100.0, - local_allocs - local_frees); - g_print ("MemChunk bytes: allocated=%lu, freed=%lu (%.2f%%), remaining=%lu\n", - local_mc_allocs, - local_mc_frees, - ((gdouble) local_mc_frees) / local_mc_allocs * 100.0, - local_mc_allocs - local_mc_frees); -} - -static gpointer -profiler_try_malloc (gsize n_bytes) -{ - gulong *p; - -#ifdef G_ENABLE_DEBUG - if (g_trap_malloc_size == n_bytes) - G_BREAKPOINT (); -#endif /* G_ENABLE_DEBUG */ - - p = standard_malloc (sizeof (gulong) * 2 + n_bytes); - - if (p) - { - p[0] = 0; /* free count */ - p[1] = n_bytes; /* length */ - profiler_log (PROFILER_ALLOC, n_bytes, TRUE); - p += 2; - } - else - profiler_log (PROFILER_ALLOC, n_bytes, FALSE); - - return p; -} - -static gpointer -profiler_malloc (gsize n_bytes) -{ - gpointer mem = profiler_try_malloc (n_bytes); - - if (!mem) - g_mem_profile (); - - return mem; -} - -static gpointer -profiler_calloc (gsize n_blocks, - gsize n_block_bytes) -{ - gsize l = n_blocks * n_block_bytes; - gulong *p; - -#ifdef G_ENABLE_DEBUG - if (g_trap_malloc_size == l) - G_BREAKPOINT (); -#endif /* G_ENABLE_DEBUG */ - - p = standard_calloc (1, sizeof (gulong) * 2 + l); - - if (p) - { - p[0] = 0; /* free count */ - p[1] = l; /* length */ - profiler_log (PROFILER_ALLOC | PROFILER_ZINIT, l, TRUE); - p += 2; - } - else - { - profiler_log (PROFILER_ALLOC | PROFILER_ZINIT, l, FALSE); - g_mem_profile (); - } - - return p; -} - -static void -profiler_free (gpointer mem) -{ - gulong *p = mem; - - p -= 2; - if (p[0]) /* free count */ - { - g_warning ("free(%p): memory has been freed %lu times already", p + 2, p[0]); - profiler_log (PROFILER_FREE, - p[1], /* length */ - FALSE); - } - else - { -#ifdef G_ENABLE_DEBUG - if (g_trap_free_size == p[1]) - G_BREAKPOINT (); -#endif /* G_ENABLE_DEBUG */ - - profiler_log (PROFILER_FREE, - p[1], /* length */ - TRUE); - memset (p + 2, 0xaa, p[1]); - - /* for all those that miss standard_free (p); in this place, yes, - * we do leak all memory when profiling, and that is intentional - * to catch double frees. patch submissions are futile. - */ - } - p[0] += 1; -} - -static gpointer -profiler_try_realloc (gpointer mem, - gsize n_bytes) -{ - gulong *p = mem; - - p -= 2; - -#ifdef G_ENABLE_DEBUG - if (g_trap_realloc_size == n_bytes) - G_BREAKPOINT (); -#endif /* G_ENABLE_DEBUG */ - - if (mem && p[0]) /* free count */ - { - g_warning ("realloc(%p, %u): memory has been freed %lu times already", p + 2, n_bytes, p[0]); - profiler_log (PROFILER_ALLOC | PROFILER_RELOC, n_bytes, FALSE); - - return NULL; - } - else - { - p = standard_realloc (mem ? p : NULL, sizeof (gulong) * 2 + n_bytes); - - if (p) - { - if (mem) - profiler_log (PROFILER_FREE | PROFILER_RELOC, p[1], TRUE); - p[0] = 0; - p[1] = n_bytes; - profiler_log (PROFILER_ALLOC | PROFILER_RELOC, p[1], TRUE); - p += 2; - } - else - profiler_log (PROFILER_ALLOC | PROFILER_RELOC, n_bytes, FALSE); - - return p; - } -} - -static gpointer -profiler_realloc (gpointer mem, - gsize n_bytes) -{ - mem = profiler_try_realloc (mem, n_bytes); - - if (!mem) - g_mem_profile (); - - return mem; -} - -static GMemVTable profiler_table = { - profiler_malloc, - profiler_realloc, - profiler_free, - profiler_calloc, - profiler_try_malloc, - profiler_try_realloc, -}; -GMemVTable *glib_mem_profiler_table = &profiler_table; - -#endif /* !G_DISABLE_CHECKS */ - - -/* --- MemChunks --- */ -typedef struct _GFreeAtom GFreeAtom; -typedef struct _GMemArea GMemArea; -typedef struct _GRealMemChunk GRealMemChunk; - -struct _GFreeAtom -{ - GFreeAtom *next; -}; - -struct _GMemArea -{ - GMemArea *next; /* the next mem area */ - GMemArea *prev; /* the previous mem area */ - gulong index; /* the current index into the "mem" array */ - gulong free; /* the number of free bytes in this mem area */ - gulong allocated; /* the number of atoms allocated from this area */ - gulong mark; /* is this mem area marked for deletion */ - gchar mem[MEM_AREA_SIZE]; /* the mem array from which atoms get allocated - * the actual size of this array is determined by - * the mem chunk "area_size". ANSI says that it - * must be declared to be the maximum size it - * can possibly be (even though the actual size - * may be less). - */ -}; - -struct _GRealMemChunk -{ - const gchar *name; /* name of this MemChunk...used for debugging output */ - gint type; /* the type of MemChunk: ALLOC_ONLY or ALLOC_AND_FREE */ - gint num_mem_areas; /* the number of memory areas */ - gint num_marked_areas; /* the number of areas marked for deletion */ - guint atom_size; /* the size of an atom */ - gulong area_size; /* the size of a memory area */ - GMemArea *mem_area; /* the current memory area */ - GMemArea *mem_areas; /* a list of all the mem areas owned by this chunk */ - GMemArea *free_mem_area; /* the free area...which is about to be destroyed */ - GFreeAtom *free_atoms; /* the free atoms list */ - GTree *mem_tree; /* tree of mem areas sorted by memory address */ - GRealMemChunk *next; /* pointer to the next chunk */ - GRealMemChunk *prev; /* pointer to the previous chunk */ -}; - - -#ifndef DISABLE_MEM_POOLS -static gulong g_mem_chunk_compute_size (gulong size, - gulong min_size) G_GNUC_CONST; -static gint g_mem_chunk_area_compare (GMemArea *a, - GMemArea *b); -static gint g_mem_chunk_area_search (GMemArea *a, - gchar *addr); - -/* here we can't use StaticMutexes, as they depend upon a working - * g_malloc, the same holds true for StaticPrivate - */ -static GMutex *mem_chunks_lock = NULL; -static GRealMemChunk *mem_chunks = NULL; - -GMemChunk* -g_mem_chunk_new (const gchar *name, - gint atom_size, - gulong area_size, - gint type) -{ - GRealMemChunk *mem_chunk; - gulong rarea_size; - - g_return_val_if_fail (atom_size > 0, NULL); - g_return_val_if_fail (area_size >= atom_size, NULL); - - ENTER_MEM_CHUNK_ROUTINE (); - - area_size = (area_size + atom_size - 1) / atom_size; - area_size *= atom_size; - - mem_chunk = g_new (struct _GRealMemChunk, 1); - mem_chunk->name = name; - mem_chunk->type = type; - mem_chunk->num_mem_areas = 0; - mem_chunk->num_marked_areas = 0; - mem_chunk->mem_area = NULL; - mem_chunk->free_mem_area = NULL; - mem_chunk->free_atoms = NULL; - mem_chunk->mem_tree = NULL; - mem_chunk->mem_areas = NULL; - mem_chunk->atom_size = atom_size; - - if (mem_chunk->type == G_ALLOC_AND_FREE) - mem_chunk->mem_tree = g_tree_new ((GCompareFunc) g_mem_chunk_area_compare); - - if (mem_chunk->atom_size % G_MEM_ALIGN) - mem_chunk->atom_size += G_MEM_ALIGN - (mem_chunk->atom_size % G_MEM_ALIGN); - - rarea_size = area_size + sizeof (GMemArea) - MEM_AREA_SIZE; - rarea_size = g_mem_chunk_compute_size (rarea_size, atom_size + sizeof (GMemArea) - MEM_AREA_SIZE); - mem_chunk->area_size = rarea_size - (sizeof (GMemArea) - MEM_AREA_SIZE); - - g_mutex_lock (mem_chunks_lock); - mem_chunk->next = mem_chunks; - mem_chunk->prev = NULL; - if (mem_chunks) - mem_chunks->prev = mem_chunk; - mem_chunks = mem_chunk; - g_mutex_unlock (mem_chunks_lock); - - LEAVE_MEM_CHUNK_ROUTINE (); - - return ((GMemChunk*) mem_chunk); -} - -void -g_mem_chunk_destroy (GMemChunk *mem_chunk) -{ - GRealMemChunk *rmem_chunk; - GMemArea *mem_areas; - GMemArea *temp_area; - - g_return_if_fail (mem_chunk != NULL); - - ENTER_MEM_CHUNK_ROUTINE (); - - rmem_chunk = (GRealMemChunk*) mem_chunk; - - mem_areas = rmem_chunk->mem_areas; - while (mem_areas) - { - temp_area = mem_areas; - mem_areas = mem_areas->next; - g_free (temp_area); - } - - if (rmem_chunk->next) - rmem_chunk->next->prev = rmem_chunk->prev; - if (rmem_chunk->prev) - rmem_chunk->prev->next = rmem_chunk->next; - - g_mutex_lock (mem_chunks_lock); - if (rmem_chunk == mem_chunks) - mem_chunks = mem_chunks->next; - g_mutex_unlock (mem_chunks_lock); - - if (rmem_chunk->type == G_ALLOC_AND_FREE) - g_tree_destroy (rmem_chunk->mem_tree); - - g_free (rmem_chunk); - - LEAVE_MEM_CHUNK_ROUTINE (); -} - -gpointer -g_mem_chunk_alloc (GMemChunk *mem_chunk) -{ - GRealMemChunk *rmem_chunk; - GMemArea *temp_area; - gpointer mem; - - ENTER_MEM_CHUNK_ROUTINE (); - - g_return_val_if_fail (mem_chunk != NULL, NULL); - - rmem_chunk = (GRealMemChunk*) mem_chunk; - - while (rmem_chunk->free_atoms) - { - /* Get the first piece of memory on the "free_atoms" list. - * We can go ahead and destroy the list node we used to keep - * track of it with and to update the "free_atoms" list to - * point to its next element. - */ - mem = rmem_chunk->free_atoms; - rmem_chunk->free_atoms = rmem_chunk->free_atoms->next; - - /* Determine which area this piece of memory is allocated from */ - temp_area = g_tree_search (rmem_chunk->mem_tree, - (GCompareFunc) g_mem_chunk_area_search, - mem); - - /* If the area has been marked, then it is being destroyed. - * (ie marked to be destroyed). - * We check to see if all of the segments on the free list that - * reference this area have been removed. This occurs when - * the ammount of free memory is less than the allocatable size. - * If the chunk should be freed, then we place it in the "free_mem_area". - * This is so we make sure not to free the mem area here and then - * allocate it again a few lines down. - * If we don't allocate a chunk a few lines down then the "free_mem_area" - * will be freed. - * If there is already a "free_mem_area" then we'll just free this mem area. - */ - if (temp_area->mark) - { - /* Update the "free" memory available in that area */ - temp_area->free += rmem_chunk->atom_size; - - if (temp_area->free == rmem_chunk->area_size) - { - if (temp_area == rmem_chunk->mem_area) - rmem_chunk->mem_area = NULL; - - if (rmem_chunk->free_mem_area) - { - rmem_chunk->num_mem_areas -= 1; - - if (temp_area->next) - temp_area->next->prev = temp_area->prev; - if (temp_area->prev) - temp_area->prev->next = temp_area->next; - if (temp_area == rmem_chunk->mem_areas) - rmem_chunk->mem_areas = rmem_chunk->mem_areas->next; - - if (rmem_chunk->type == G_ALLOC_AND_FREE) - g_tree_remove (rmem_chunk->mem_tree, temp_area); - g_free (temp_area); - } - else - rmem_chunk->free_mem_area = temp_area; - - rmem_chunk->num_marked_areas -= 1; - } - } - else - { - /* Update the number of allocated atoms count. - */ - temp_area->allocated += 1; - - /* The area wasn't marked...return the memory - */ - goto outa_here; - } - } - - /* If there isn't a current mem area or the current mem area is out of space - * then allocate a new mem area. We'll first check and see if we can use - * the "free_mem_area". Otherwise we'll just malloc the mem area. - */ - if ((!rmem_chunk->mem_area) || - ((rmem_chunk->mem_area->index + rmem_chunk->atom_size) > rmem_chunk->area_size)) - { - if (rmem_chunk->free_mem_area) - { - rmem_chunk->mem_area = rmem_chunk->free_mem_area; - rmem_chunk->free_mem_area = NULL; - } - else - { -#ifdef ENABLE_GC_FRIENDLY - rmem_chunk->mem_area = (GMemArea*) g_malloc0 (sizeof (GMemArea) - - MEM_AREA_SIZE + - rmem_chunk->area_size); -#else /* !ENABLE_GC_FRIENDLY */ - rmem_chunk->mem_area = (GMemArea*) g_malloc (sizeof (GMemArea) - - MEM_AREA_SIZE + - rmem_chunk->area_size); -#endif /* ENABLE_GC_FRIENDLY */ - - rmem_chunk->num_mem_areas += 1; - rmem_chunk->mem_area->next = rmem_chunk->mem_areas; - rmem_chunk->mem_area->prev = NULL; - - if (rmem_chunk->mem_areas) - rmem_chunk->mem_areas->prev = rmem_chunk->mem_area; - rmem_chunk->mem_areas = rmem_chunk->mem_area; - - if (rmem_chunk->type == G_ALLOC_AND_FREE) - g_tree_insert (rmem_chunk->mem_tree, rmem_chunk->mem_area, rmem_chunk->mem_area); - } - - rmem_chunk->mem_area->index = 0; - rmem_chunk->mem_area->free = rmem_chunk->area_size; - rmem_chunk->mem_area->allocated = 0; - rmem_chunk->mem_area->mark = 0; - } - - /* Get the memory and modify the state variables appropriately. - */ - mem = (gpointer) &rmem_chunk->mem_area->mem[rmem_chunk->mem_area->index]; - rmem_chunk->mem_area->index += rmem_chunk->atom_size; - rmem_chunk->mem_area->free -= rmem_chunk->atom_size; - rmem_chunk->mem_area->allocated += 1; - -outa_here: - - LEAVE_MEM_CHUNK_ROUTINE (); - - return mem; -} - -gpointer -g_mem_chunk_alloc0 (GMemChunk *mem_chunk) -{ - gpointer mem; - - mem = g_mem_chunk_alloc (mem_chunk); - if (mem) - { - GRealMemChunk *rmem_chunk = (GRealMemChunk*) mem_chunk; - - memset (mem, 0, rmem_chunk->atom_size); - } - - return mem; -} - -void -g_mem_chunk_free (GMemChunk *mem_chunk, - gpointer mem) -{ - GRealMemChunk *rmem_chunk; - GMemArea *temp_area; - GFreeAtom *free_atom; - - g_return_if_fail (mem_chunk != NULL); - g_return_if_fail (mem != NULL); - - ENTER_MEM_CHUNK_ROUTINE (); - - rmem_chunk = (GRealMemChunk*) mem_chunk; - -#ifdef ENABLE_GC_FRIENDLY - memset (mem, 0, rmem_chunk->atom_size); -#endif /* ENABLE_GC_FRIENDLY */ - - /* Don't do anything if this is an ALLOC_ONLY chunk - */ - if (rmem_chunk->type == G_ALLOC_AND_FREE) - { - /* Place the memory on the "free_atoms" list - */ - free_atom = (GFreeAtom*) mem; - free_atom->next = rmem_chunk->free_atoms; - rmem_chunk->free_atoms = free_atom; - - temp_area = g_tree_search (rmem_chunk->mem_tree, - (GCompareFunc) g_mem_chunk_area_search, - mem); - - temp_area->allocated -= 1; - - if (temp_area->allocated == 0) - { - temp_area->mark = 1; - rmem_chunk->num_marked_areas += 1; - } - } - - LEAVE_MEM_CHUNK_ROUTINE (); -} - -/* This doesn't free the free_area if there is one */ -void -g_mem_chunk_clean (GMemChunk *mem_chunk) -{ - GRealMemChunk *rmem_chunk; - GMemArea *mem_area; - GFreeAtom *prev_free_atom; - GFreeAtom *temp_free_atom; - gpointer mem; - - g_return_if_fail (mem_chunk != NULL); - - ENTER_MEM_CHUNK_ROUTINE (); - - rmem_chunk = (GRealMemChunk*) mem_chunk; - - if (rmem_chunk->type == G_ALLOC_AND_FREE) - { - prev_free_atom = NULL; - temp_free_atom = rmem_chunk->free_atoms; - - while (temp_free_atom) - { - mem = (gpointer) temp_free_atom; - - mem_area = g_tree_search (rmem_chunk->mem_tree, - (GCompareFunc) g_mem_chunk_area_search, - mem); - - /* If this mem area is marked for destruction then delete the - * area and list node and decrement the free mem. - */ - if (mem_area->mark) - { - if (prev_free_atom) - prev_free_atom->next = temp_free_atom->next; - else - rmem_chunk->free_atoms = temp_free_atom->next; - temp_free_atom = temp_free_atom->next; - - mem_area->free += rmem_chunk->atom_size; - if (mem_area->free == rmem_chunk->area_size) - { - rmem_chunk->num_mem_areas -= 1; - rmem_chunk->num_marked_areas -= 1; - - if (mem_area->next) - mem_area->next->prev = mem_area->prev; - if (mem_area->prev) - mem_area->prev->next = mem_area->next; - if (mem_area == rmem_chunk->mem_areas) - rmem_chunk->mem_areas = rmem_chunk->mem_areas->next; - if (mem_area == rmem_chunk->mem_area) - rmem_chunk->mem_area = NULL; - - if (rmem_chunk->type == G_ALLOC_AND_FREE) - g_tree_remove (rmem_chunk->mem_tree, mem_area); - g_free (mem_area); - } - } - else - { - prev_free_atom = temp_free_atom; - temp_free_atom = temp_free_atom->next; - } - } - } - LEAVE_MEM_CHUNK_ROUTINE (); -} - -void -g_mem_chunk_reset (GMemChunk *mem_chunk) -{ - GRealMemChunk *rmem_chunk; - GMemArea *mem_areas; - GMemArea *temp_area; - - g_return_if_fail (mem_chunk != NULL); - - ENTER_MEM_CHUNK_ROUTINE (); - - rmem_chunk = (GRealMemChunk*) mem_chunk; - - mem_areas = rmem_chunk->mem_areas; - rmem_chunk->num_mem_areas = 0; - rmem_chunk->mem_areas = NULL; - rmem_chunk->mem_area = NULL; - - while (mem_areas) - { - temp_area = mem_areas; - mem_areas = mem_areas->next; - g_free (temp_area); - } - - rmem_chunk->free_atoms = NULL; - - if (rmem_chunk->mem_tree) - g_tree_destroy (rmem_chunk->mem_tree); - rmem_chunk->mem_tree = g_tree_new ((GCompareFunc) g_mem_chunk_area_compare); - - LEAVE_MEM_CHUNK_ROUTINE (); -} - -void -g_mem_chunk_print (GMemChunk *mem_chunk) -{ - GRealMemChunk *rmem_chunk; - GMemArea *mem_areas; - gulong mem; - - g_return_if_fail (mem_chunk != NULL); - - rmem_chunk = (GRealMemChunk*) mem_chunk; - mem_areas = rmem_chunk->mem_areas; - mem = 0; - - while (mem_areas) - { - mem += rmem_chunk->area_size - mem_areas->free; - mem_areas = mem_areas->next; - } - - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, - "%s: %ld bytes using %d mem areas", - rmem_chunk->name, mem, rmem_chunk->num_mem_areas); -} - -void -g_mem_chunk_info (void) -{ - GRealMemChunk *mem_chunk; - gint count; - - count = 0; - g_mutex_lock (mem_chunks_lock); - mem_chunk = mem_chunks; - while (mem_chunk) - { - count += 1; - mem_chunk = mem_chunk->next; - } - g_mutex_unlock (mem_chunks_lock); - - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "%d mem chunks", count); - - g_mutex_lock (mem_chunks_lock); - mem_chunk = mem_chunks; - g_mutex_unlock (mem_chunks_lock); - - while (mem_chunk) - { - g_mem_chunk_print ((GMemChunk*) mem_chunk); - mem_chunk = mem_chunk->next; - } -} - -void -g_blow_chunks (void) -{ - GRealMemChunk *mem_chunk; - - g_mutex_lock (mem_chunks_lock); - mem_chunk = mem_chunks; - g_mutex_unlock (mem_chunks_lock); - while (mem_chunk) - { - g_mem_chunk_clean ((GMemChunk*) mem_chunk); - mem_chunk = mem_chunk->next; - } -} - -static gulong -g_mem_chunk_compute_size (gulong size, - gulong min_size) -{ - gulong power_of_2; - gulong lower, upper; - - power_of_2 = 16; - while (power_of_2 < size) - power_of_2 <<= 1; - - lower = power_of_2 >> 1; - upper = power_of_2; - - if (size - lower < upper - size && lower >= min_size) - return lower; - else - return upper; -} - -static gint -g_mem_chunk_area_compare (GMemArea *a, - GMemArea *b) -{ - if (a->mem > b->mem) - return 1; - else if (a->mem < b->mem) - return -1; - return 0; -} - -static gint -g_mem_chunk_area_search (GMemArea *a, - gchar *addr) -{ - if (a->mem <= addr) - { - if (addr < &a->mem[a->index]) - return 0; - return 1; - } - return -1; -} - -#else /* DISABLE_MEM_POOLS */ - -typedef struct { - guint alloc_size; /* the size of an atom */ -} GMinimalMemChunk; - -GMemChunk* -g_mem_chunk_new (const gchar *name, - gint atom_size, - gulong area_size, - gint type) -{ - GMinimalMemChunk *mem_chunk; - - g_return_val_if_fail (atom_size > 0, NULL); - - mem_chunk = g_new (GMinimalMemChunk, 1); - mem_chunk->alloc_size = atom_size; - - return ((GMemChunk*) mem_chunk); -} - -void -g_mem_chunk_destroy (GMemChunk *mem_chunk) -{ - g_return_if_fail (mem_chunk != NULL); - - g_free (mem_chunk); -} - -gpointer -g_mem_chunk_alloc (GMemChunk *mem_chunk) -{ - GMinimalMemChunk *minimal = (GMinimalMemChunk *)mem_chunk; - - g_return_val_if_fail (mem_chunk != NULL, NULL); - - return g_malloc (minimal->alloc_size); -} - -gpointer -g_mem_chunk_alloc0 (GMemChunk *mem_chunk) -{ - GMinimalMemChunk *minimal = (GMinimalMemChunk *)mem_chunk; - - g_return_val_if_fail (mem_chunk != NULL, NULL); - - return g_malloc0 (minimal->alloc_size); -} - -void -g_mem_chunk_free (GMemChunk *mem_chunk, - gpointer mem) -{ - g_return_if_fail (mem_chunk != NULL); - - g_free (mem); -} - -void g_mem_chunk_clean (GMemChunk *mem_chunk) {} -void g_mem_chunk_reset (GMemChunk *mem_chunk) {} -void g_mem_chunk_print (GMemChunk *mem_chunk) {} -void g_mem_chunk_info (void) {} -void g_blow_chunks (void) {} - -#endif /* DISABLE_MEM_POOLS */ - - -/* generic allocators - */ -struct _GAllocator /* from gmem.c */ -{ - gchar *name; - guint16 n_preallocs; - guint is_unused : 1; - guint type : 4; - GAllocator *last; - GMemChunk *mem_chunk; - gpointer dummy; /* implementation specific */ -}; - -GAllocator* -g_allocator_new (const gchar *name, - guint n_preallocs) -{ - GAllocator *allocator; - - g_return_val_if_fail (name != NULL, NULL); - - allocator = g_new0 (GAllocator, 1); - allocator->name = g_strdup (name); - allocator->n_preallocs = CLAMP (n_preallocs, 1, 65535); - allocator->is_unused = TRUE; - allocator->type = 0; - allocator->last = NULL; - allocator->mem_chunk = NULL; - allocator->dummy = NULL; - - return allocator; -} - -void -g_allocator_free (GAllocator *allocator) -{ - g_return_if_fail (allocator != NULL); - g_return_if_fail (allocator->is_unused == TRUE); - - g_free (allocator->name); - if (allocator->mem_chunk) - g_mem_chunk_destroy (allocator->mem_chunk); - - g_free (allocator); -} - -void -g_mem_init (void) -{ -#ifndef DISABLE_MEM_POOLS - mem_chunks_lock = g_mutex_new (); -#endif -#ifndef G_DISABLE_CHECKS - mem_chunk_recursion = g_private_new (NULL); - g_profile_mutex = g_mutex_new (); -#endif -} diff --git a/gmem.h b/gmem.h deleted file mode 100644 index 014326c6b..000000000 --- a/gmem.h +++ /dev/null @@ -1,174 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_MEM_H__ -#define __G_MEM_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef struct _GAllocator GAllocator; -typedef struct _GMemChunk GMemChunk; -typedef struct _GMemVTable GMemVTable; - - -#if GLIB_SIZEOF_VOID_P > GLIB_SIZEOF_LONG -# define G_MEM_ALIGN GLIB_SIZEOF_VOID_P -#else /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */ -# define G_MEM_ALIGN GLIB_SIZEOF_LONG -#endif /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */ - - -/* Memory allocation functions - */ -gpointer g_malloc (gulong n_bytes); -gpointer g_malloc0 (gulong n_bytes); -gpointer g_realloc (gpointer mem, - gulong n_bytes); -void g_free (gpointer mem); -gpointer g_try_malloc (gulong n_bytes); -gpointer g_try_realloc (gpointer mem, - gulong n_bytes); - - -/* Convenience memory allocators - */ -#define g_new(struct_type, n_structs) \ - ((struct_type *) g_malloc (((gsize) sizeof (struct_type)) * ((gsize) (n_structs)))) -#define g_new0(struct_type, n_structs) \ - ((struct_type *) g_malloc0 (((gsize) sizeof (struct_type)) * ((gsize) (n_structs)))) -#define g_renew(struct_type, mem, n_structs) \ - ((struct_type *) g_realloc ((mem), ((gsize) sizeof (struct_type)) * ((gsize) (n_structs)))) - - -/* Memory allocation virtualization for debugging purposes - * g_mem_set_vtable() has to be the very first GLib function called - * if being used - */ -struct _GMemVTable -{ - gpointer (*malloc) (gsize n_bytes); - gpointer (*realloc) (gpointer mem, - gsize n_bytes); - void (*free) (gpointer mem); - /* optional */ - gpointer (*calloc) (gsize n_blocks, - gsize n_block_bytes); - gpointer (*try_malloc) (gsize n_bytes); - gpointer (*try_realloc) (gpointer mem, - gsize n_bytes); -}; -void g_mem_set_vtable (GMemVTable *vtable); - - -/* Memory profiler and checker, has to be enabled via g_mem_set_vtable() - */ -GLIB_VAR GMemVTable *glib_mem_profiler_table; -void g_mem_profile (void); - - -/* Memchunk convenience functions - */ -#define g_mem_chunk_create(type, pre_alloc, alloc_type) ( \ - g_mem_chunk_new (#type " mem chunks (" #pre_alloc ")", \ - sizeof (type), \ - sizeof (type) * (pre_alloc), \ - (alloc_type)) \ -) -#define g_chunk_new(type, chunk) ( \ - (type *) g_mem_chunk_alloc (chunk) \ -) -#define g_chunk_new0(type, chunk) ( \ - (type *) g_mem_chunk_alloc0 (chunk) \ -) -#define g_chunk_free(mem, mem_chunk) G_STMT_START { \ - g_mem_chunk_free ((mem_chunk), (mem)); \ -} G_STMT_END - - -/* "g_mem_chunk_new" creates a new memory chunk. - * Memory chunks are used to allocate pieces of memory which are - * always the same size. Lists are a good example of such a data type. - * The memory chunk allocates and frees blocks of memory as needed. - * Just be sure to call "g_mem_chunk_free" and not "g_free" on data - * allocated in a mem chunk. ("g_free" will most likely cause a seg - * fault...somewhere). - * - * Oh yeah, GMemChunk is an opaque data type. (You don't really - * want to know what's going on inside do you?) - */ - -/* ALLOC_ONLY MemChunk's can only allocate memory. The free operation - * is interpreted as a no op. ALLOC_ONLY MemChunk's save 4 bytes per - * atom. (They are also useful for lists which use MemChunk to allocate - * memory but are also part of the MemChunk implementation). - * ALLOC_AND_FREE MemChunk's can allocate and free memory. - */ - -#define G_ALLOC_ONLY 1 -#define G_ALLOC_AND_FREE 2 - -GMemChunk* g_mem_chunk_new (const gchar *name, - gint atom_size, - gulong area_size, - gint type); -void g_mem_chunk_destroy (GMemChunk *mem_chunk); -gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); -gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); -void g_mem_chunk_free (GMemChunk *mem_chunk, - gpointer mem); -void g_mem_chunk_clean (GMemChunk *mem_chunk); -void g_mem_chunk_reset (GMemChunk *mem_chunk); -void g_mem_chunk_print (GMemChunk *mem_chunk); -void g_mem_chunk_info (void); - -/* Ah yes...we have a "g_blow_chunks" function. - * "g_blow_chunks" simply compresses all the chunks. This operation - * consists of freeing every memory area that should be freed (but - * which we haven't gotten around to doing yet). And, no, - * "g_blow_chunks" doesn't follow the naming scheme, but it is a - * much better name than "g_mem_chunk_clean_all" or something - * similar. - */ -void g_blow_chunks (void); - - -/* Generic allocators - */ -GAllocator* g_allocator_new (const gchar *name, - guint n_preallocs); -void g_allocator_free (GAllocator *allocator); - -/* internal */ -#define G_ALLOCATOR_LIST (1) -#define G_ALLOCATOR_SLIST (2) -#define G_ALLOCATOR_NODE (3) - - -G_END_DECLS - -#endif /* __G_MEM_H__ */ diff --git a/gmessages.c b/gmessages.c deleted file mode 100644 index 194795037..000000000 --- a/gmessages.c +++ /dev/null @@ -1,1256 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdlib.h> -#include <stdarg.h> -#include <stdio.h> -#include <string.h> -#include "glib.h" -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <signal.h> -#include <locale.h> -#include <errno.h> - -#ifdef G_OS_WIN32 -typedef FILE* GFileDescriptor; -#else -typedef gint GFileDescriptor; -#endif - -/* --- structures --- */ -typedef struct _GLogDomain GLogDomain; -typedef struct _GLogHandler GLogHandler; -struct _GLogDomain -{ - gchar *log_domain; - GLogLevelFlags fatal_mask; - GLogHandler *handlers; - GLogDomain *next; -}; -struct _GLogHandler -{ - guint id; - GLogLevelFlags log_level; - GLogFunc log_func; - gpointer data; - GLogHandler *next; -}; - - -/* --- prototypes --- */ -static guint printf_string_upper_bound (const gchar *format, - gboolean may_warn, - va_list args); - - -/* --- variables --- */ - -static GMutex* g_messages_lock = NULL; - -const gchar *g_log_domain_glib = "GLib"; -static GLogDomain *g_log_domains = NULL; -static GLogLevelFlags g_log_always_fatal = G_LOG_FATAL_MASK; -static GPrintFunc glib_print_func = NULL; -static GPrintFunc glib_printerr_func = NULL; -static GErrorFunc glib_error_func = NULL; -static GWarningFunc glib_warning_func = NULL; -static GPrintFunc glib_message_func = NULL; - -static GPrivate* g_log_depth = NULL; - -/* --- functions --- */ -#ifdef G_OS_WIN32 -# define STRICT -# include <windows.h> -# undef STRICT -# include <process.h> /* For _getpid() */ - -static gboolean alloc_console_called = FALSE; - -static gboolean gonna_abort = FALSE; - -/* This default message will usually be overwritten. */ -/* Yes, a fixed size buffer is bad. So sue me. But g_error is never - * with huge strings, is it? */ -static char fatal_msg_buf[1000] = "Unspecified fatal error encountered, aborting."; -static char *fatal_msg_ptr = fatal_msg_buf; - -/* Just use stdio. If we're out of memory, we're hosed anyway. */ -#undef write -static inline int -dowrite (GFileDescriptor fd, - const void *buf, - unsigned int len) -{ - if (gonna_abort) - { - memcpy (fatal_msg_ptr, buf, len); - fatal_msg_ptr += len; - *fatal_msg_ptr = 0; - return len; - } - - fwrite (buf, len, 1, fd); - fflush (fd); - - return len; -} - -#define write(fd, buf, len) dowrite(fd, buf, len) - -static void -ensure_stdout_valid (void) -{ - HANDLE handle; - - if (gonna_abort) - return; - - if (!alloc_console_called) - { - handle = GetStdHandle (STD_OUTPUT_HANDLE); - - if (handle == INVALID_HANDLE_VALUE) - { - AllocConsole (); - alloc_console_called = TRUE; - freopen ("CONOUT$", "w", stdout); - } - } -} -#else -#define ensure_stdout_valid() /* Define as empty */ -#endif - -static void -write_unsigned (GFileDescriptor fd, - gulong num, - guint radix) -{ - char buffer[64]; - gulong tmp; - char c; - int i, n; - - g_return_if_fail (radix >= 2 && radix <= 36); - - if (!num) - { - write (fd, "0", 1); - return; - } - - if (radix == 16) - write (fd, "0x", 2); - else if (radix == 8) - write (fd, "0", 1); - - n = 0; - tmp = num; - while (tmp) - { - tmp /= radix; - n++; - } - - i = n; - while (num) - { - i--; - c = (num % radix); - if (c < 10) - buffer[i] = c + '0'; - else - buffer[i] = c + 'a' - 10; - num /= radix; - } - - write (fd, buffer, n); -} - -static void -write_string (GFileDescriptor fd, - gchar *string) -{ - write (fd, string, strlen (string)); -} - -static void -g_log_write_prefix (GFileDescriptor fd, - GLogLevelFlags mask) -{ - static GLogLevelFlags g_log_msg_prefix = G_LOG_LEVEL_ERROR | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_DEBUG; - static gboolean initialized = FALSE; - - g_mutex_lock (g_messages_lock); - - if (!initialized) - { - const gchar *val; - initialized = TRUE; - - val = g_getenv ("G_MESSAGES_PREFIXED"); - - if (val) - { - static const GDebugKey keys[] = { - { "error", G_LOG_LEVEL_ERROR }, - { "critical", G_LOG_LEVEL_CRITICAL }, - { "warning", G_LOG_LEVEL_WARNING }, - { "message", G_LOG_LEVEL_MESSAGE }, - { "info", G_LOG_LEVEL_INFO }, - { "debug", G_LOG_LEVEL_DEBUG } - }; - - g_log_msg_prefix = g_parse_debug_string (val, keys, G_N_ELEMENTS (keys)); - } - } - - g_mutex_unlock (g_messages_lock); - - if ((g_log_msg_prefix & mask) == mask) - { - gchar *prg_name; - - prg_name = g_get_prgname (); - - if (!prg_name) - write_string (fd, "(process:"); - else - { - write_string (fd, prg_name); - write_string (fd, " (pid:"); - } - - write_unsigned (fd, getpid (), 10); - write_string (fd, "): "); - } -} - -static inline GLogDomain* -g_log_find_domain (const gchar *log_domain) -{ - register GLogDomain *domain; - - g_mutex_lock (g_messages_lock); - domain = g_log_domains; - while (domain) - { - if (strcmp (domain->log_domain, log_domain) == 0) - { - g_mutex_unlock (g_messages_lock); - return domain; - } - domain = domain->next; - } - g_mutex_unlock (g_messages_lock); - return NULL; -} - -static inline GLogDomain* -g_log_domain_new (const gchar *log_domain) -{ - register GLogDomain *domain; - - domain = g_new (GLogDomain, 1); - domain->log_domain = g_strdup (log_domain); - domain->fatal_mask = G_LOG_FATAL_MASK; - domain->handlers = NULL; - - g_mutex_lock (g_messages_lock); - domain->next = g_log_domains; - g_log_domains = domain; - g_mutex_unlock (g_messages_lock); - - return domain; -} - -static inline void -g_log_domain_check_free (GLogDomain *domain) -{ - if (domain->fatal_mask == G_LOG_FATAL_MASK && - domain->handlers == NULL) - { - register GLogDomain *last, *work; - - last = NULL; - - g_mutex_lock (g_messages_lock); - work = g_log_domains; - while (work) - { - if (work == domain) - { - if (last) - last->next = domain->next; - else - g_log_domains = domain->next; - g_free (domain->log_domain); - g_free (domain); - break; - } - last = work; - work = last->next; - } - g_mutex_unlock (g_messages_lock); - } -} - -static inline GLogFunc -g_log_domain_get_handler (GLogDomain *domain, - GLogLevelFlags log_level, - gpointer *data) -{ - if (domain && log_level) - { - register GLogHandler *handler; - - handler = domain->handlers; - while (handler) - { - if ((handler->log_level & log_level) == log_level) - { - *data = handler->data; - return handler->log_func; - } - handler = handler->next; - } - } - return g_log_default_handler; -} - -GLogLevelFlags -g_log_set_always_fatal (GLogLevelFlags fatal_mask) -{ - GLogLevelFlags old_mask; - - /* restrict the global mask to levels that are known to glib */ - fatal_mask &= (1 << G_LOG_LEVEL_USER_SHIFT) - 1; - /* force errors to be fatal */ - fatal_mask |= G_LOG_LEVEL_ERROR; - /* remove bogus flag */ - fatal_mask &= ~G_LOG_FLAG_FATAL; - - g_mutex_lock (g_messages_lock); - old_mask = g_log_always_fatal; - g_log_always_fatal = fatal_mask; - g_mutex_unlock (g_messages_lock); - - return old_mask; -} - -GLogLevelFlags -g_log_set_fatal_mask (const gchar *log_domain, - GLogLevelFlags fatal_mask) -{ - GLogLevelFlags old_flags; - register GLogDomain *domain; - - if (!log_domain) - log_domain = ""; - - /* force errors to be fatal */ - fatal_mask |= G_LOG_LEVEL_ERROR; - /* remove bogus flag */ - fatal_mask &= ~G_LOG_FLAG_FATAL; - - domain = g_log_find_domain (log_domain); - if (!domain) - domain = g_log_domain_new (log_domain); - old_flags = domain->fatal_mask; - - domain->fatal_mask = fatal_mask; - g_log_domain_check_free (domain); - - return old_flags; -} - -guint -g_log_set_handler (const gchar *log_domain, - GLogLevelFlags log_levels, - GLogFunc log_func, - gpointer user_data) -{ - register GLogDomain *domain; - register GLogHandler *handler; - static guint handler_id = 0; - - g_return_val_if_fail ((log_levels & G_LOG_LEVEL_MASK) != 0, 0); - g_return_val_if_fail (log_func != NULL, 0); - - if (!log_domain) - log_domain = ""; - - domain = g_log_find_domain (log_domain); - if (!domain) - domain = g_log_domain_new (log_domain); - - handler = g_new (GLogHandler, 1); - g_mutex_lock (g_messages_lock); - handler->id = ++handler_id; - g_mutex_unlock (g_messages_lock); - handler->log_level = log_levels; - handler->log_func = log_func; - handler->data = user_data; - handler->next = domain->handlers; - domain->handlers = handler; - - return handler_id; -} - -void -g_log_remove_handler (const gchar *log_domain, - guint handler_id) -{ - register GLogDomain *domain; - - g_return_if_fail (handler_id > 0); - - if (!log_domain) - log_domain = ""; - - domain = g_log_find_domain (log_domain); - if (domain) - { - register GLogHandler *work, *last; - - last = NULL; - work = domain->handlers; - while (work) - { - if (work->id == handler_id) - { - if (last) - last->next = work->next; - else - domain->handlers = work->next; - g_free (work); - g_log_domain_check_free (domain); - return; - } - last = work; - work = last->next; - } - } - g_warning ("g_log_remove_handler(): could not find handler with id `%d' for domain \"%s\"", - handler_id, - log_domain); -} - -void -g_logv (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *format, - va_list args1) -{ - va_list args2; - gchar buffer[1025]; - register gint i; - - log_level &= G_LOG_LEVEL_MASK; - if (!log_level) - return; - - /* we use a stack buffer of fixed size, because we might get called - * recursively. - */ - G_VA_COPY (args2, args1); - if (printf_string_upper_bound (format, FALSE, args1) < 1024) - vsprintf (buffer, format, args2); - else - { - /* since we might be out of memory, we can't use g_vsnprintf(). */ -#ifdef HAVE_VSNPRINTF - vsnprintf (buffer, 1024, format, args2); -#else /* !HAVE_VSNPRINTF */ - /* we are out of luck here */ - strncpy (buffer, format, 1024); -#endif /* !HAVE_VSNPRINTF */ - buffer[1024] = 0; - } - va_end (args2); - - for (i = g_bit_nth_msf (log_level, -1); i >= 0; i = g_bit_nth_msf (log_level, i)) - { - register GLogLevelFlags test_level; - - test_level = 1 << i; - if (log_level & test_level) - { - guint depth = GPOINTER_TO_UINT (g_private_get (g_log_depth)); - GLogDomain *domain; - GLogFunc log_func; - gpointer data = NULL; - - domain = g_log_find_domain (log_domain ? log_domain : ""); - - if (depth) - test_level |= G_LOG_FLAG_RECURSION; - - depth++; - g_private_set (g_log_depth, GUINT_TO_POINTER (depth)); - - g_mutex_lock (g_messages_lock); - if ((((domain ? domain->fatal_mask : G_LOG_FATAL_MASK) | - g_log_always_fatal) & test_level) != 0) - test_level |= G_LOG_FLAG_FATAL; - g_mutex_unlock (g_messages_lock); - - log_func = g_log_domain_get_handler (domain, test_level, &data); - log_func (log_domain, test_level, buffer, data); - - /* *domain can be cluttered now */ - - if (test_level & G_LOG_FLAG_FATAL) - { -#if defined (G_ENABLE_DEBUG) && defined (SIGTRAP) - if (!(test_level & G_LOG_FLAG_RECURSION)) - G_BREAKPOINT (); - else - abort (); -#else /* !G_ENABLE_DEBUG || !SIGTRAP */ -#ifdef G_OS_WIN32 - MessageBox (NULL, fatal_msg_buf, NULL, MB_OK); -#endif -# if defined (_MSC_VER) && defined (_DEBUG) - /* let's see the call stack ... */ - __asm int 3 -# endif - abort (); -#endif /* !G_ENABLE_DEBUG || !SIGTRAP */ - } - - depth--; - g_private_set (g_log_depth, GUINT_TO_POINTER (depth)); - } - } -} - -void -g_log (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *format, - ...) -{ - va_list args; - - va_start (args, format); - g_logv (log_domain, log_level, format, args); - va_end (args); -} - -void -g_log_default_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer unused_data) -{ - GFileDescriptor fd; - gboolean in_recursion; - gboolean is_fatal; - GErrorFunc local_glib_error_func; - GWarningFunc local_glib_warning_func; - GPrintFunc local_glib_message_func; - - in_recursion = (log_level & G_LOG_FLAG_RECURSION) != 0; - is_fatal = (log_level & G_LOG_FLAG_FATAL) != 0; - log_level &= G_LOG_LEVEL_MASK; - - if (!message) - message = "g_log_default_handler(): (NULL) message"; - -#ifdef G_OS_WIN32 - /* Use just stdout as stderr is hard to get redirected from the - * DOS prompt. - */ - fd = stdout; - gonna_abort = is_fatal; -#else - fd = (log_level > G_LOG_LEVEL_MESSAGE) ? 1 : 2; -#endif - - g_mutex_lock (g_messages_lock); - local_glib_error_func = glib_error_func; - local_glib_warning_func = glib_warning_func; - local_glib_message_func = glib_message_func; - g_mutex_unlock (g_messages_lock); - - switch (log_level) - { - case G_LOG_LEVEL_ERROR: - if (!log_domain && local_glib_error_func) - { - /* compatibility code */ - local_glib_error_func (message); - return; - } - /* use write(2) for output, in case we are out of memeory */ - ensure_stdout_valid (); - write (fd, "\n", 1); - g_log_write_prefix (fd, log_level); - - if (log_domain) - { - write (fd, log_domain, strlen (log_domain)); - write (fd, "-", 1); - } - else - write (fd, "** ", 3); - if (in_recursion) - write (fd, "ERROR (recursed) **: ", 21); - else - write (fd, "ERROR **: ", 10); - write (fd, message, strlen (message)); - if (is_fatal) - write (fd, "\naborting...\n", 13); - else - write (fd, "\n", 1); - break; - case G_LOG_LEVEL_CRITICAL: - ensure_stdout_valid (); - write (fd, "\n", 1); - g_log_write_prefix (fd, log_level); - - if (log_domain) - { - write (fd, log_domain, strlen (log_domain)); - write (fd, "-", 1); - } - else - write (fd, "** ", 3); - if (in_recursion) - write (fd, "CRITICAL (recursed) **: ", 24); - else - write (fd, "CRITICAL **: ", 13); - write (fd, message, strlen (message)); - if (is_fatal) - write (fd, "\naborting...\n", 13); - else - write (fd, "\n", 1); - break; - case G_LOG_LEVEL_WARNING: - if (!log_domain && local_glib_warning_func) - { - /* compatibility code */ - local_glib_warning_func (message); - return; - } - ensure_stdout_valid (); - write (fd, "\n", 1); - g_log_write_prefix (fd, log_level); - - if (log_domain) - { - write (fd, log_domain, strlen (log_domain)); - write (fd, "-", 1); - } - else - write (fd, "** ", 3); - if (in_recursion) - write (fd, "WARNING (recursed) **: ", 23); - else - write (fd, "WARNING **: ", 12); - write (fd, message, strlen (message)); - if (is_fatal) - write (fd, "\naborting...\n", 13); - else - write (fd, "\n", 1); - break; - case G_LOG_LEVEL_MESSAGE: - if (!log_domain && local_glib_message_func) - { - /* compatibility code */ - local_glib_message_func (message); - return; - } - ensure_stdout_valid (); - - g_log_write_prefix (fd, log_level); - - if (log_domain) - { - write (fd, log_domain, strlen (log_domain)); - write (fd, "-", 1); - } - if (in_recursion) - write (fd, "Message (recursed): ", 20); - else - write (fd, "Message: ", 9); - write (fd, message, strlen (message)); - if (is_fatal) - write (fd, "\naborting...\n", 13); - else - write (fd, "\n", 1); - break; - case G_LOG_LEVEL_INFO: - ensure_stdout_valid (); - - g_log_write_prefix (fd, log_level); - - if (log_domain) - { - write (fd, log_domain, strlen (log_domain)); - write (fd, "-", 1); - } - if (in_recursion) - write (fd, "INFO (recursed): ", 17); - else - write (fd, "INFO: ", 6); - write (fd, message, strlen (message)); - if (is_fatal) - write (fd, "\naborting...\n", 13); - else - write (fd, "\n", 1); - break; - case G_LOG_LEVEL_DEBUG: - ensure_stdout_valid (); - - g_log_write_prefix (fd, log_level); - - if (log_domain) - { - write (fd, log_domain, strlen (log_domain)); - write (fd, "-", 1); - } - if (in_recursion) - write (fd, "DEBUG (recursed): ", 18); - else - write (fd, "DEBUG: ", 7); - write (fd, message, strlen (message)); - if (is_fatal) - write (fd, "\naborting...\n", 13); - else - write (fd, "\n", 1); - break; - default: - /* we are used for a log level that is not defined by GLib itself, - * try to make the best out of it. - */ - ensure_stdout_valid (); - - g_log_write_prefix (fd, log_level); - - if (log_domain) - { - write (fd, log_domain, strlen (log_domain)); - if (in_recursion) - write (fd, "-LOG (recursed:", 15); - else - write (fd, "-LOG (", 6); - } - else if (in_recursion) - write (fd, "LOG (recursed:", 14); - else - write (fd, "LOG (", 5); - if (log_level) - { - gchar string[] = "0x00): "; - gchar *p = string + 2; - guint i; - - i = g_bit_nth_msf (log_level, -1); - *p = i >> 4; - p++; - *p = '0' + (i & 0xf); - if (*p > '9') - *p += 'A' - '9' - 1; - - write (fd, string, 7); - } - else - write (fd, "): ", 3); - write (fd, message, strlen (message)); - if (is_fatal) - write (fd, "\naborting...\n", 13); - else - write (fd, "\n", 1); - break; - } -} - -GPrintFunc -g_set_print_handler (GPrintFunc func) -{ - GPrintFunc old_print_func; - - g_mutex_lock (g_messages_lock); - old_print_func = glib_print_func; - glib_print_func = func; - g_mutex_unlock (g_messages_lock); - - return old_print_func; -} - -void -g_print (const gchar *format, - ...) -{ - va_list args; - gchar *string; - GPrintFunc local_glib_print_func; - - g_return_if_fail (format != NULL); - - va_start (args, format); - string = g_strdup_vprintf (format, args); - va_end (args); - - g_mutex_lock (g_messages_lock); - local_glib_print_func = glib_print_func; - g_mutex_unlock (g_messages_lock); - - if (local_glib_print_func) - local_glib_print_func (string); - else - { - ensure_stdout_valid (); - fputs (string, stdout); - fflush (stdout); - } - g_free (string); -} - -GPrintFunc -g_set_printerr_handler (GPrintFunc func) -{ - GPrintFunc old_printerr_func; - - g_mutex_lock (g_messages_lock); - old_printerr_func = glib_printerr_func; - glib_printerr_func = func; - g_mutex_unlock (g_messages_lock); - - return old_printerr_func; -} - -void -g_printerr (const gchar *format, - ...) -{ - va_list args; - gchar *string; - GPrintFunc local_glib_printerr_func; - - g_return_if_fail (format != NULL); - - va_start (args, format); - string = g_strdup_vprintf (format, args); - va_end (args); - - g_mutex_lock (g_messages_lock); - local_glib_printerr_func = glib_printerr_func; - g_mutex_unlock (g_messages_lock); - - if (local_glib_printerr_func) - local_glib_printerr_func (string); - else - { - fputs (string, stderr); - fflush (stderr); - } - g_free (string); -} - -/* compatibility code */ -GErrorFunc -g_set_error_handler (GErrorFunc func) -{ - GErrorFunc old_error_func; - - g_mutex_lock (g_messages_lock); - old_error_func = glib_error_func; - glib_error_func = func; - g_mutex_unlock (g_messages_lock); - - return old_error_func; -} - -/* compatibility code */ -GWarningFunc -g_set_warning_handler (GWarningFunc func) -{ - GWarningFunc old_warning_func; - - g_mutex_lock (g_messages_lock); - old_warning_func = glib_warning_func; - glib_warning_func = func; - g_mutex_unlock (g_messages_lock); - - return old_warning_func; -} - -/* compatibility code */ -GPrintFunc -g_set_message_handler (GPrintFunc func) -{ - GPrintFunc old_message_func; - - g_mutex_lock (g_messages_lock); - old_message_func = glib_message_func; - glib_message_func = func; - g_mutex_unlock (g_messages_lock); - - return old_message_func; -} - -#ifndef MB_LEN_MAX -# define MB_LEN_MAX 8 -#endif - -typedef struct -{ - guint min_width; - guint precision; - gboolean alternate_format, zero_padding, adjust_left, locale_grouping; - gboolean add_space, add_sign, possible_sign, seen_precision; - gboolean mod_half, mod_long, mod_extra_long; -} PrintfArgSpec; - -static gsize -printf_string_upper_bound (const gchar *format, - gboolean may_warn, - va_list args) -{ - static const gboolean honour_longs = SIZEOF_LONG > 4 || SIZEOF_VOID_P > 4; - gsize len = 1; - - if (!format) - return len; - - while (*format) - { - register gchar c = *format++; - - if (c != '%') - len += 1; - else /* (c == '%') */ - { - PrintfArgSpec spec = { 0, }; - gboolean seen_l = FALSE, conv_done = FALSE; - gsize conv_len = 0; - const gchar *spec_start = format; - - do - { - c = *format++; - switch (c) - { - GDoubleIEEE754 u_double; - guint v_uint; - gint v_int; - const gchar *v_string; - - /* beware of positional parameters - */ - case '$': - if (may_warn) - g_warning (G_GNUC_PRETTY_FUNCTION - "(): unable to handle positional parameters (%%n$)"); - len += 1024; /* try adding some safety padding */ - break; - - /* parse flags - */ - case '#': - spec.alternate_format = TRUE; - break; - case '0': - spec.zero_padding = TRUE; - break; - case '-': - spec.adjust_left = TRUE; - break; - case ' ': - spec.add_space = TRUE; - break; - case '+': - spec.add_sign = TRUE; - break; - case '\'': - spec.locale_grouping = TRUE; - break; - - /* parse output size specifications - */ - case '.': - spec.seen_precision = TRUE; - break; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - v_uint = c - '0'; - c = *format; - while (c >= '0' && c <= '9') - { - format++; - v_uint = v_uint * 10 + c - '0'; - c = *format; - } - if (spec.seen_precision) - spec.precision = MAX (spec.precision, v_uint); - else - spec.min_width = MAX (spec.min_width, v_uint); - break; - case '*': - v_int = va_arg (args, int); - if (spec.seen_precision) - { - /* forget about negative precision */ - if (v_int >= 0) - spec.precision = MAX (spec.precision, v_int); - } - else - { - if (v_int < 0) - { - v_int = - v_int; - spec.adjust_left = TRUE; - } - spec.min_width = MAX (spec.min_width, v_int); - } - break; - - /* parse type modifiers - */ - case 'h': - spec.mod_half = TRUE; - break; - case 'l': - if (!seen_l) - { - spec.mod_long = TRUE; - seen_l = TRUE; - break; - } - /* else, fall through */ - case 'L': - case 'q': - spec.mod_long = TRUE; - spec.mod_extra_long = TRUE; - break; - case 'z': - case 'Z': -#if GLIB_SIZEOF_SIZE_T > 4 - spec.mod_long = TRUE; - spec.mod_extra_long = TRUE; -#endif /* GLIB_SIZEOF_SIZE_T > 4 */ - break; - case 't': -#if GLIB_SIZEOF_PTRDIFF_T > 4 - spec.mod_long = TRUE; - spec.mod_extra_long = TRUE; -#endif /* GLIB_SIZEOF_PTRDIFF_T > 4 */ - break; - case 'j': -#if GLIB_SIZEOF_INTMAX_T > 4 - spec.mod_long = TRUE; - spec.mod_extra_long = TRUE; -#endif /* GLIB_SIZEOF_INTMAX_T > 4 */ - break; - - /* parse output conversions - */ - case '%': - conv_len += 1; - break; - case 'O': - case 'D': - case 'I': - case 'U': - /* some C libraries feature long variants for these as well? */ - spec.mod_long = TRUE; - /* fall through */ - case 'o': - conv_len += 2; - /* fall through */ - case 'd': - case 'i': - conv_len += 1; /* sign */ - /* fall through */ - case 'u': - conv_len += 4; - /* fall through */ - case 'x': - case 'X': - spec.possible_sign = TRUE; - conv_len += 10; - if (spec.mod_long && honour_longs) - conv_len *= 2; - if (spec.mod_extra_long) - conv_len *= 2; - if (spec.mod_extra_long) - { -#ifdef G_HAVE_GINT64 - (void) va_arg (args, gint64); -#else /* !G_HAVE_GINT64 */ - (void) va_arg (args, long); -#endif /* !G_HAVE_GINT64 */ - } - else if (spec.mod_long) - (void) va_arg (args, long); - else - (void) va_arg (args, int); - break; - case 'A': - case 'a': - /* 0x */ - conv_len += 2; - /* fall through */ - case 'g': - case 'G': - case 'e': - case 'E': - case 'f': - spec.possible_sign = TRUE; - /* n . dddddddddddddddddddddddd E +- eeee */ - conv_len += 1 + 1 + MAX (24, spec.precision) + 1 + 1 + 4; - if (may_warn && spec.mod_extra_long) - g_warning (G_GNUC_PRETTY_FUNCTION - "(): unable to handle long double, collecting double only"); -#ifdef HAVE_LONG_DOUBLE -#error need to implement special handling for long double -#endif - u_double.v_double = va_arg (args, double); - /* %f can expand up to all significant digits before '.' (308) */ - if (c == 'f' && - u_double.mpn.biased_exponent > 0 && u_double.mpn.biased_exponent < 2047) - { - gint exp = u_double.mpn.biased_exponent; - - exp -= G_IEEE754_DOUBLE_BIAS; - exp = exp * G_LOG_2_BASE_10 + 1; - conv_len += exp; - } - /* some printf() implementations require extra padding for rounding */ - conv_len += 2; - /* we can't really handle locale specific grouping here */ - if (spec.locale_grouping) - conv_len *= 2; - break; - case 'C': - spec.mod_long = TRUE; - /* fall through */ - case 'c': - conv_len += spec.mod_long ? MB_LEN_MAX : 1; - (void) va_arg (args, int); - break; - case 'S': - spec.mod_long = TRUE; - /* fall through */ - case 's': - v_string = va_arg (args, char*); - if (!v_string) - conv_len += 8; /* hold "(null)" */ - else if (spec.seen_precision) - conv_len += spec.precision; - else - conv_len += strlen (v_string); - conv_done = TRUE; - if (spec.mod_long) - { - if (may_warn) - g_warning (G_GNUC_PRETTY_FUNCTION - "(): unable to handle wide char strings"); - len += 1024; /* try adding some safety padding */ - } - break; - case 'P': /* do we actually need this? */ - /* fall through */ - case 'p': - spec.alternate_format = TRUE; - conv_len += 10; - if (honour_longs) - conv_len *= 2; - /* fall through */ - case 'n': - conv_done = TRUE; - (void) va_arg (args, void*); - break; - case 'm': - /* there's not much we can do to be clever */ - v_string = g_strerror (errno); - v_uint = v_string ? strlen (v_string) : 0; - conv_len += MAX (256, v_uint); - break; - - /* handle invalid cases - */ - case '\000': - /* no conversion specification, bad bad */ - conv_len += format - spec_start; - break; - default: - if (may_warn) - g_warning (G_GNUC_PRETTY_FUNCTION - "(): unable to handle `%c' while parsing format", - c); - break; - } - conv_done |= conv_len > 0; - } - while (!conv_done); - /* handle width specifications */ - conv_len = MAX (conv_len, MAX (spec.precision, spec.min_width)); - /* handle flags */ - conv_len += spec.alternate_format ? 2 : 0; - conv_len += (spec.add_space || spec.add_sign || spec.possible_sign); - /* finally done */ - len += conv_len; - } /* else (c == '%') */ - } /* while (*format) */ - - return len; -} - -gsize -g_printf_string_upper_bound (const gchar *format, - va_list args) -{ - return printf_string_upper_bound (format, TRUE, args); -} - -void -g_messages_init (void) -{ - g_messages_lock = g_mutex_new(); - g_log_depth = g_private_new(NULL); -} diff --git a/gmessages.h b/gmessages.h deleted file mode 100644 index 5657604c7..000000000 --- a/gmessages.h +++ /dev/null @@ -1,341 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_MESSAGES_H__ -#define __G_MESSAGES_H__ - -#include <stdarg.h> -#include <gtypes.h> - -G_BEGIN_DECLS - -/* calculate a string size, guarranteed to fit format + args. - */ -gsize g_printf_string_upper_bound (const gchar* format, - va_list args); - -/* Log level shift offset for user defined - * log levels (0-7 are used by GLib). - */ -#define G_LOG_LEVEL_USER_SHIFT (8) - -/* Glib log levels and flags. - */ -typedef enum -{ - /* log flags */ - G_LOG_FLAG_RECURSION = 1 << 0, - G_LOG_FLAG_FATAL = 1 << 1, - - /* GLib log levels */ - G_LOG_LEVEL_ERROR = 1 << 2, /* always fatal */ - G_LOG_LEVEL_CRITICAL = 1 << 3, - G_LOG_LEVEL_WARNING = 1 << 4, - G_LOG_LEVEL_MESSAGE = 1 << 5, - G_LOG_LEVEL_INFO = 1 << 6, - G_LOG_LEVEL_DEBUG = 1 << 7, - - G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) -} GLogLevelFlags; - -/* GLib log levels that are considered fatal by default */ -#define G_LOG_FATAL_MASK (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR) - -typedef void (*GLogFunc) (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data); - -/* Logging mechanism - */ -GLIB_VAR const gchar *g_log_domain_glib; -guint g_log_set_handler (const gchar *log_domain, - GLogLevelFlags log_levels, - GLogFunc log_func, - gpointer user_data); -void g_log_remove_handler (const gchar *log_domain, - guint handler_id); -void g_log_default_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer unused_data); -void g_log (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *format, - ...) G_GNUC_PRINTF (3, 4); -void g_logv (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *format, - va_list args); -GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, - GLogLevelFlags fatal_mask); -GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); - -#ifndef G_LOG_DOMAIN -#define G_LOG_DOMAIN ((gchar*) 0) -#endif /* G_LOG_DOMAIN */ -#ifdef G_HAVE_ISO_VARARGS -#define g_error(...) g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_ERROR, \ - __VA_ARGS__) -#define g_message(...) g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_MESSAGE, \ - __VA_ARGS__) -#define g_critical(...) g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - __VA_ARGS__) -#define g_warning(...) g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_WARNING, \ - __VA_ARGS__) -#elif defined(G_HAVE_GNUC_VARARGS) -#define g_error(format...) g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_ERROR, \ - format) -#define g_message(format...) g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_MESSAGE, \ - format) -#define g_critical(format...) g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - format) -#define g_warning(format...) g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_WARNING, \ - format) -#else /* no varargs macros */ -static void -g_error (const gchar *format, - ...) -{ - va_list args; - va_start (args, format); - g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args); - va_end (args); -} -static void -g_message (const gchar *format, - ...) -{ - va_list args; - va_start (args, format); - g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args); - va_end (args); -} -static void -g_critical (const gchar *format, - ...) -{ - va_list args; - va_start (args, format); - g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args); - va_end (args); -} -static void -g_warning (const gchar *format, - ...) -{ - va_list args; - va_start (args, format); - g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args); - va_end (args); -} -#endif /* !__GNUC__ */ - -typedef void (*GPrintFunc) (const gchar *string); -void g_print (const gchar *format, - ...) G_GNUC_PRINTF (1, 2); -GPrintFunc g_set_print_handler (GPrintFunc func); -void g_printerr (const gchar *format, - ...) G_GNUC_PRINTF (1, 2); -GPrintFunc g_set_printerr_handler (GPrintFunc func); - -/* deprecated compatibility functions, use g_log_set_handler() instead */ -typedef void (*GErrorFunc) (const gchar *str); -typedef void (*GWarningFunc) (const gchar *str); -GErrorFunc g_set_error_handler (GErrorFunc func); -GWarningFunc g_set_warning_handler (GWarningFunc func); -GPrintFunc g_set_message_handler (GPrintFunc func); - -/* Provide macros for error handling. The "assert" macros will - * exit on failure. The "return" macros will exit the current - * function. Two different definitions are given for the macros - * if G_DISABLE_ASSERT is not defined, in order to support gcc's - * __PRETTY_FUNCTION__ capability. - */ - -#ifdef G_DISABLE_ASSERT - -#define g_assert(expr) -#define g_assert_not_reached() - -#else /* !G_DISABLE_ASSERT */ - -#ifdef __GNUC__ - -#define g_assert(expr) G_STMT_START{ \ - if (!(expr)) \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_ERROR, \ - "file %s: line %d (%s): assertion failed: (%s)", \ - __FILE__, \ - __LINE__, \ - __PRETTY_FUNCTION__, \ - #expr); }G_STMT_END - -#define g_assert_not_reached() G_STMT_START{ \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_ERROR, \ - "file %s: line %d (%s): should not be reached", \ - __FILE__, \ - __LINE__, \ - __PRETTY_FUNCTION__); }G_STMT_END - -#else /* !__GNUC__ */ - -#define g_assert(expr) G_STMT_START{ \ - if (!(expr)) \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_ERROR, \ - "file %s: line %d: assertion failed: (%s)", \ - __FILE__, \ - __LINE__, \ - #expr); }G_STMT_END - -#define g_assert_not_reached() G_STMT_START{ \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_ERROR, \ - "file %s: line %d: should not be reached", \ - __FILE__, \ - __LINE__); }G_STMT_END - -#endif /* __GNUC__ */ - -#endif /* !G_DISABLE_ASSERT */ - - -#ifdef G_DISABLE_CHECKS - -#define g_return_if_fail(expr) -#define g_return_val_if_fail(expr,val) -#define g_return_if_reached() return -#define g_return_val_if_reached(val) return (val) - -#else /* !G_DISABLE_CHECKS */ - -#ifdef __GNUC__ - -#define g_return_if_fail(expr) G_STMT_START{ \ - if (!(expr)) \ - { \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - "file %s: line %d (%s): assertion `%s' failed", \ - __FILE__, \ - __LINE__, \ - __PRETTY_FUNCTION__, \ - #expr); \ - return; \ - }; }G_STMT_END - -#define g_return_val_if_fail(expr,val) G_STMT_START{ \ - if (!(expr)) \ - { \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - "file %s: line %d (%s): assertion `%s' failed", \ - __FILE__, \ - __LINE__, \ - __PRETTY_FUNCTION__, \ - #expr); \ - return (val); \ - }; }G_STMT_END - -#define g_return_if_reached() G_STMT_START{ \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - "file %s: line %d (%s): should not be reached", \ - __FILE__, \ - __LINE__, \ - __PRETTY_FUNCTION__); \ - return; }G_STMT_END - -#define g_return_val_if_reached(val) G_STMT_START{ \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - "file %s: line %d (%s): should not be reached", \ - __FILE__, \ - __LINE__, \ - __PRETTY_FUNCTION__); \ - return (val); }G_STMT_END - -#else /* !__GNUC__ */ - -#define g_return_if_fail(expr) G_STMT_START{ \ - if (!(expr)) \ - { \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - "file %s: line %d: assertion `%s' failed", \ - __FILE__, \ - __LINE__, \ - #expr); \ - return; \ - }; }G_STMT_END - -#define g_return_val_if_fail(expr, val) G_STMT_START{ \ - if (!(expr)) \ - { \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - "file %s: line %d: assertion `%s' failed", \ - __FILE__, \ - __LINE__, \ - #expr); \ - return (val); \ - }; }G_STMT_END - -#define g_return_if_reached() G_STMT_START{ \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - "file %s: line %d: should not be reached", \ - __FILE__, \ - __LINE__); \ - return; }G_STMT_END - -#define g_return_val_if_reached(val) G_STMT_START{ \ - g_log (G_LOG_DOMAIN, \ - G_LOG_LEVEL_CRITICAL, \ - "file %s: line %d: should not be reached", \ - __FILE__, \ - __LINE__); \ - return (val); }G_STMT_END - -#endif /* !__GNUC__ */ - -#endif /* !G_DISABLE_CHECKS */ - -G_END_DECLS - -#endif /* __G_MESSAGES_H__ */ - diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am index 95f43d250..faa8d1d20 100644 --- a/gmodule/Makefile.am +++ b/gmodule/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule \ +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_srcdir)/gmodule \ -DG_LOG_DOMAIN=\"GModule\" @GLIB_DEBUG_FLAGS@ EXTRA_DIST = \ @@ -28,7 +28,7 @@ glibincludedir=$(includedir)/glib-2.0 glibinclude_HEADERS = \ gmodule.h -libglib = $(top_builddir)/libglib-1.3.la +libglib = $(top_builddir)/glib/libglib-1.3.la top_builddir_full=`cd \$(top_builddir); pwd` diff --git a/gnode.c b/gnode.c deleted file mode 100644 index 77143a8c4..000000000 --- a/gnode.c +++ /dev/null @@ -1,1064 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * GNode: N-way tree implementation. - * Copyright (C) 1998 Tim Janik - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glib.h" - -#ifndef DISABLE_MEM_POOLS -/* node allocation - */ -struct _GAllocator /* from gmem.c */ -{ - gchar *name; - guint16 n_preallocs; - guint is_unused : 1; - guint type : 4; - GAllocator *last; - GMemChunk *mem_chunk; - GNode *free_nodes; /* implementation specific */ -}; - -G_LOCK_DEFINE_STATIC (current_allocator); -static GAllocator *current_allocator = NULL; - -/* HOLDS: current_allocator_lock */ -static void -g_node_validate_allocator (GAllocator *allocator) -{ - g_return_if_fail (allocator != NULL); - g_return_if_fail (allocator->is_unused == TRUE); - - if (allocator->type != G_ALLOCATOR_NODE) - { - allocator->type = G_ALLOCATOR_NODE; - if (allocator->mem_chunk) - { - g_mem_chunk_destroy (allocator->mem_chunk); - allocator->mem_chunk = NULL; - } - } - - if (!allocator->mem_chunk) - { - allocator->mem_chunk = g_mem_chunk_new (allocator->name, - sizeof (GNode), - sizeof (GNode) * allocator->n_preallocs, - G_ALLOC_ONLY); - allocator->free_nodes = NULL; - } - - allocator->is_unused = FALSE; -} - -void -g_node_push_allocator (GAllocator *allocator) -{ - G_LOCK (current_allocator); - g_node_validate_allocator (allocator); - allocator->last = current_allocator; - current_allocator = allocator; - G_UNLOCK (current_allocator); -} - -void -g_node_pop_allocator (void) -{ - G_LOCK (current_allocator); - if (current_allocator) - { - GAllocator *allocator; - - allocator = current_allocator; - current_allocator = allocator->last; - allocator->last = NULL; - allocator->is_unused = TRUE; - } - G_UNLOCK (current_allocator); -} - - -/* --- functions --- */ -GNode* -g_node_new (gpointer data) -{ - GNode *node; - - G_LOCK (current_allocator); - if (!current_allocator) - { - GAllocator *allocator = g_allocator_new ("GLib default GNode allocator", - 128); - g_node_validate_allocator (allocator); - allocator->last = NULL; - current_allocator = allocator; - } - if (!current_allocator->free_nodes) - node = g_chunk_new (GNode, current_allocator->mem_chunk); - else - { - node = current_allocator->free_nodes; - current_allocator->free_nodes = node->next; - } - G_UNLOCK (current_allocator); - - node->data = data; - node->next = NULL; - node->prev = NULL; - node->parent = NULL; - node->children = NULL; - - return node; -} - -static void -g_nodes_free (GNode *node) -{ - GNode *parent; - - parent = node; - while (1) - { - if (parent->children) - g_nodes_free (parent->children); - -#ifdef ENABLE_GC_FRIENDLY - parent->data = NULL; - parent->prev = NULL; - parent->parent = NULL; - parent->children = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - if (parent->next) - parent = parent->next; - else - break; - } - - G_LOCK (current_allocator); - parent->next = current_allocator->free_nodes; - current_allocator->free_nodes = node; - G_UNLOCK (current_allocator); -} -#else /* DISABLE_MEM_POOLS */ - -GNode* -g_node_new (gpointer data) -{ - GNode *node; - - node = g_new0 (GNode, 1); - - node->data = data; - - return node; -} - -static void -g_nodes_free (GNode *root) -{ - GNode *node, *next; - - node = root; - while (node != NULL) - { - next = node->next; - g_nodes_free (node->children); - g_free (node); - node = next; - } -} -#endif - -void -g_node_destroy (GNode *root) -{ - g_return_if_fail (root != NULL); - - if (!G_NODE_IS_ROOT (root)) - g_node_unlink (root); - - g_nodes_free (root); -} - -void -g_node_unlink (GNode *node) -{ - g_return_if_fail (node != NULL); - - if (node->prev) - node->prev->next = node->next; - else if (node->parent) - node->parent->children = node->next; - node->parent = NULL; - if (node->next) - { - node->next->prev = node->prev; - node->next = NULL; - } - node->prev = NULL; -} - -GNode* -g_node_copy (GNode *node) -{ - GNode *new_node = NULL; - - if (node) - { - GNode *child; - - new_node = g_node_new (node->data); - - for (child = g_node_last_child (node); child; child = child->prev) - g_node_prepend (new_node, g_node_copy (child)); - } - - return new_node; -} - -GNode* -g_node_insert (GNode *parent, - gint position, - GNode *node) -{ - g_return_val_if_fail (parent != NULL, node); - g_return_val_if_fail (node != NULL, node); - g_return_val_if_fail (G_NODE_IS_ROOT (node), node); - - if (position > 0) - return g_node_insert_before (parent, - g_node_nth_child (parent, position), - node); - else if (position == 0) - return g_node_prepend (parent, node); - else /* if (position < 0) */ - return g_node_append (parent, node); -} - -GNode* -g_node_insert_before (GNode *parent, - GNode *sibling, - GNode *node) -{ - g_return_val_if_fail (parent != NULL, node); - g_return_val_if_fail (node != NULL, node); - g_return_val_if_fail (G_NODE_IS_ROOT (node), node); - if (sibling) - g_return_val_if_fail (sibling->parent == parent, node); - - node->parent = parent; - - if (sibling) - { - if (sibling->prev) - { - node->prev = sibling->prev; - node->prev->next = node; - node->next = sibling; - sibling->prev = node; - } - else - { - node->parent->children = node; - node->next = sibling; - sibling->prev = node; - } - } - else - { - if (parent->children) - { - sibling = parent->children; - while (sibling->next) - sibling = sibling->next; - node->prev = sibling; - sibling->next = node; - } - else - node->parent->children = node; - } - - return node; -} - -GNode* -g_node_insert_after (GNode *parent, - GNode *sibling, - GNode *node) -{ - g_return_val_if_fail (parent != NULL, node); - g_return_val_if_fail (node != NULL, node); - g_return_val_if_fail (G_NODE_IS_ROOT (node), node); - if (sibling) - g_return_val_if_fail (sibling->parent == parent, node); - - node->parent = parent; - - if (sibling) - { - if (sibling->next) - { - sibling->next->prev = node; - } - node->next = sibling->next; - node->prev = sibling; - sibling->next = node; - } - else - { - if (parent->children) - { - node->next = parent->children; - parent->children->prev = node; - } - parent->children = node; - } - - return node; -} - -GNode* -g_node_prepend (GNode *parent, - GNode *node) -{ - g_return_val_if_fail (parent != NULL, node); - - return g_node_insert_before (parent, parent->children, node); -} - -GNode* -g_node_get_root (GNode *node) -{ - g_return_val_if_fail (node != NULL, NULL); - - while (node->parent) - node = node->parent; - - return node; -} - -gboolean -g_node_is_ancestor (GNode *node, - GNode *descendant) -{ - g_return_val_if_fail (node != NULL, FALSE); - g_return_val_if_fail (descendant != NULL, FALSE); - - while (descendant) - { - if (descendant->parent == node) - return TRUE; - - descendant = descendant->parent; - } - - return FALSE; -} - -/* returns 1 for root, 2 for first level children, - * 3 for children's children... - */ -guint -g_node_depth (GNode *node) -{ - register guint depth = 0; - - while (node) - { - depth++; - node = node->parent; - } - - return depth; -} - -void -g_node_reverse_children (GNode *node) -{ - GNode *child; - GNode *last; - - g_return_if_fail (node != NULL); - - child = node->children; - last = NULL; - while (child) - { - last = child; - child = last->next; - last->next = last->prev; - last->prev = child; - } - node->children = last; -} - -guint -g_node_max_height (GNode *root) -{ - register GNode *child; - register guint max_height = 0; - - if (!root) - return 0; - - child = root->children; - while (child) - { - register guint tmp_height; - - tmp_height = g_node_max_height (child); - if (tmp_height > max_height) - max_height = tmp_height; - child = child->next; - } - - return max_height + 1; -} - -static gboolean -g_node_traverse_pre_order (GNode *node, - GTraverseFlags flags, - GNodeTraverseFunc func, - gpointer data) -{ - if (node->children) - { - GNode *child; - - if ((flags & G_TRAVERSE_NON_LEAFS) && - func (node, data)) - return TRUE; - - child = node->children; - while (child) - { - register GNode *current; - - current = child; - child = current->next; - if (g_node_traverse_pre_order (current, flags, func, data)) - return TRUE; - } - } - else if ((flags & G_TRAVERSE_LEAFS) && - func (node, data)) - return TRUE; - - return FALSE; -} - -static gboolean -g_node_depth_traverse_pre_order (GNode *node, - GTraverseFlags flags, - guint depth, - GNodeTraverseFunc func, - gpointer data) -{ - if (node->children) - { - GNode *child; - - if ((flags & G_TRAVERSE_NON_LEAFS) && - func (node, data)) - return TRUE; - - depth--; - if (!depth) - return FALSE; - - child = node->children; - while (child) - { - register GNode *current; - - current = child; - child = current->next; - if (g_node_depth_traverse_pre_order (current, flags, depth, func, data)) - return TRUE; - } - } - else if ((flags & G_TRAVERSE_LEAFS) && - func (node, data)) - return TRUE; - - return FALSE; -} - -static gboolean -g_node_traverse_post_order (GNode *node, - GTraverseFlags flags, - GNodeTraverseFunc func, - gpointer data) -{ - if (node->children) - { - GNode *child; - - child = node->children; - while (child) - { - register GNode *current; - - current = child; - child = current->next; - if (g_node_traverse_post_order (current, flags, func, data)) - return TRUE; - } - - if ((flags & G_TRAVERSE_NON_LEAFS) && - func (node, data)) - return TRUE; - - } - else if ((flags & G_TRAVERSE_LEAFS) && - func (node, data)) - return TRUE; - - return FALSE; -} - -static gboolean -g_node_depth_traverse_post_order (GNode *node, - GTraverseFlags flags, - guint depth, - GNodeTraverseFunc func, - gpointer data) -{ - if (node->children) - { - depth--; - if (depth) - { - GNode *child; - - child = node->children; - while (child) - { - register GNode *current; - - current = child; - child = current->next; - if (g_node_depth_traverse_post_order (current, flags, depth, func, data)) - return TRUE; - } - } - - if ((flags & G_TRAVERSE_NON_LEAFS) && - func (node, data)) - return TRUE; - - } - else if ((flags & G_TRAVERSE_LEAFS) && - func (node, data)) - return TRUE; - - return FALSE; -} - -static gboolean -g_node_traverse_in_order (GNode *node, - GTraverseFlags flags, - GNodeTraverseFunc func, - gpointer data) -{ - if (node->children) - { - GNode *child; - register GNode *current; - - child = node->children; - current = child; - child = current->next; - - if (g_node_traverse_in_order (current, flags, func, data)) - return TRUE; - - if ((flags & G_TRAVERSE_NON_LEAFS) && - func (node, data)) - return TRUE; - - while (child) - { - current = child; - child = current->next; - if (g_node_traverse_in_order (current, flags, func, data)) - return TRUE; - } - } - else if ((flags & G_TRAVERSE_LEAFS) && - func (node, data)) - return TRUE; - - return FALSE; -} - -static gboolean -g_node_depth_traverse_in_order (GNode *node, - GTraverseFlags flags, - guint depth, - GNodeTraverseFunc func, - gpointer data) -{ - if (node->children) - { - depth--; - if (depth) - { - GNode *child; - register GNode *current; - - child = node->children; - current = child; - child = current->next; - - if (g_node_depth_traverse_in_order (current, flags, depth, func, data)) - return TRUE; - - if ((flags & G_TRAVERSE_NON_LEAFS) && - func (node, data)) - return TRUE; - - while (child) - { - current = child; - child = current->next; - if (g_node_depth_traverse_in_order (current, flags, depth, func, data)) - return TRUE; - } - } - else if ((flags & G_TRAVERSE_NON_LEAFS) && - func (node, data)) - return TRUE; - } - else if ((flags & G_TRAVERSE_LEAFS) && - func (node, data)) - return TRUE; - - return FALSE; -} - -static gboolean -g_node_traverse_children (GNode *node, - GTraverseFlags flags, - GNodeTraverseFunc func, - gpointer data) -{ - GNode *child; - - child = node->children; - - while (child) - { - register GNode *current; - - current = child; - child = current->next; - - if (current->children) - { - if ((flags & G_TRAVERSE_NON_LEAFS) && - func (current, data)) - return TRUE; - } - else if ((flags & G_TRAVERSE_LEAFS) && - func (current, data)) - return TRUE; - } - - child = node->children; - - while (child) - { - register GNode *current; - - current = child; - child = current->next; - - if (current->children && - g_node_traverse_children (current, flags, func, data)) - return TRUE; - } - - return FALSE; -} - -static gboolean -g_node_depth_traverse_children (GNode *node, - GTraverseFlags flags, - guint depth, - GNodeTraverseFunc func, - gpointer data) -{ - GNode *child; - - child = node->children; - - while (child) - { - register GNode *current; - - current = child; - child = current->next; - - if (current->children) - { - if ((flags & G_TRAVERSE_NON_LEAFS) && - func (current, data)) - return TRUE; - } - else if ((flags & G_TRAVERSE_LEAFS) && - func (current, data)) - return TRUE; - } - - depth--; - if (!depth) - return FALSE; - - child = node->children; - - while (child) - { - register GNode *current; - - current = child; - child = current->next; - - if (current->children && - g_node_depth_traverse_children (current, flags, depth, func, data)) - return TRUE; - } - - return FALSE; -} - -void -g_node_traverse (GNode *root, - GTraverseType order, - GTraverseFlags flags, - gint depth, - GNodeTraverseFunc func, - gpointer data) -{ - g_return_if_fail (root != NULL); - g_return_if_fail (func != NULL); - g_return_if_fail (order <= G_LEVEL_ORDER); - g_return_if_fail (flags <= G_TRAVERSE_MASK); - g_return_if_fail (depth == -1 || depth > 0); - - switch (order) - { - case G_PRE_ORDER: - if (depth < 0) - g_node_traverse_pre_order (root, flags, func, data); - else - g_node_depth_traverse_pre_order (root, flags, depth, func, data); - break; - case G_POST_ORDER: - if (depth < 0) - g_node_traverse_post_order (root, flags, func, data); - else - g_node_depth_traverse_post_order (root, flags, depth, func, data); - break; - case G_IN_ORDER: - if (depth < 0) - g_node_traverse_in_order (root, flags, func, data); - else - g_node_depth_traverse_in_order (root, flags, depth, func, data); - break; - case G_LEVEL_ORDER: - if (root->children) - { - if (!((flags & G_TRAVERSE_NON_LEAFS) && - func (root, data))) - { - if (depth < 0) - g_node_traverse_children (root, flags, func, data); - else - { - depth--; - if (depth) - g_node_depth_traverse_children (root, flags, depth, func, data); - } - } - } - else if (flags & G_TRAVERSE_LEAFS) - func (root, data); - break; - } -} - -static gboolean -g_node_find_func (GNode *node, - gpointer data) -{ - register gpointer *d = data; - - if (*d != node->data) - return FALSE; - - *(++d) = node; - - return TRUE; -} - -GNode* -g_node_find (GNode *root, - GTraverseType order, - GTraverseFlags flags, - gpointer data) -{ - gpointer d[2]; - - g_return_val_if_fail (root != NULL, NULL); - g_return_val_if_fail (order <= G_LEVEL_ORDER, NULL); - g_return_val_if_fail (flags <= G_TRAVERSE_MASK, NULL); - - d[0] = data; - d[1] = NULL; - - g_node_traverse (root, order, flags, -1, g_node_find_func, d); - - return d[1]; -} - -static void -g_node_count_func (GNode *node, - GTraverseFlags flags, - guint *n) -{ - if (node->children) - { - GNode *child; - - if (flags & G_TRAVERSE_NON_LEAFS) - (*n)++; - - child = node->children; - while (child) - { - g_node_count_func (child, flags, n); - child = child->next; - } - } - else if (flags & G_TRAVERSE_LEAFS) - (*n)++; -} - -guint -g_node_n_nodes (GNode *root, - GTraverseFlags flags) -{ - guint n = 0; - - g_return_val_if_fail (root != NULL, 0); - g_return_val_if_fail (flags <= G_TRAVERSE_MASK, 0); - - g_node_count_func (root, flags, &n); - - return n; -} - -GNode* -g_node_last_child (GNode *node) -{ - g_return_val_if_fail (node != NULL, NULL); - - node = node->children; - if (node) - while (node->next) - node = node->next; - - return node; -} - -GNode* -g_node_nth_child (GNode *node, - guint n) -{ - g_return_val_if_fail (node != NULL, NULL); - - node = node->children; - if (node) - while ((n-- > 0) && node) - node = node->next; - - return node; -} - -guint -g_node_n_children (GNode *node) -{ - guint n = 0; - - g_return_val_if_fail (node != NULL, 0); - - node = node->children; - while (node) - { - n++; - node = node->next; - } - - return n; -} - -GNode* -g_node_find_child (GNode *node, - GTraverseFlags flags, - gpointer data) -{ - g_return_val_if_fail (node != NULL, NULL); - g_return_val_if_fail (flags <= G_TRAVERSE_MASK, NULL); - - node = node->children; - while (node) - { - if (node->data == data) - { - if (G_NODE_IS_LEAF (node)) - { - if (flags & G_TRAVERSE_LEAFS) - return node; - } - else - { - if (flags & G_TRAVERSE_NON_LEAFS) - return node; - } - } - node = node->next; - } - - return NULL; -} - -gint -g_node_child_position (GNode *node, - GNode *child) -{ - register guint n = 0; - - g_return_val_if_fail (node != NULL, -1); - g_return_val_if_fail (child != NULL, -1); - g_return_val_if_fail (child->parent == node, -1); - - node = node->children; - while (node) - { - if (node == child) - return n; - n++; - node = node->next; - } - - return -1; -} - -gint -g_node_child_index (GNode *node, - gpointer data) -{ - register guint n = 0; - - g_return_val_if_fail (node != NULL, -1); - - node = node->children; - while (node) - { - if (node->data == data) - return n; - n++; - node = node->next; - } - - return -1; -} - -GNode* -g_node_first_sibling (GNode *node) -{ - g_return_val_if_fail (node != NULL, NULL); - - if (node->parent) - return node->parent->children; - - while (node->prev) - node = node->prev; - - return node; -} - -GNode* -g_node_last_sibling (GNode *node) -{ - g_return_val_if_fail (node != NULL, NULL); - - while (node->next) - node = node->next; - - return node; -} - -void -g_node_children_foreach (GNode *node, - GTraverseFlags flags, - GNodeForeachFunc func, - gpointer data) -{ - g_return_if_fail (node != NULL); - g_return_if_fail (flags <= G_TRAVERSE_MASK); - g_return_if_fail (func != NULL); - - node = node->children; - while (node) - { - register GNode *current; - - current = node; - node = current->next; - if (G_NODE_IS_LEAF (current)) - { - if (flags & G_TRAVERSE_LEAFS) - func (current, data); - } - else - { - if (flags & G_TRAVERSE_NON_LEAFS) - func (current, data); - } - } -} diff --git a/gnode.h b/gnode.h deleted file mode 100644 index c4a9c5f69..000000000 --- a/gnode.h +++ /dev/null @@ -1,163 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_NODE_H__ -#define __G_NODE_H__ - -#include <gmem.h> - -G_BEGIN_DECLS - -typedef struct _GNode GNode; - -/* Tree traverse flags */ -typedef enum -{ - G_TRAVERSE_LEAFS = 1 << 0, - G_TRAVERSE_NON_LEAFS = 1 << 1, - G_TRAVERSE_ALL = G_TRAVERSE_LEAFS | G_TRAVERSE_NON_LEAFS, - G_TRAVERSE_MASK = 0x03 -} GTraverseFlags; - -/* Tree traverse orders */ -typedef enum -{ - G_IN_ORDER, - G_PRE_ORDER, - G_POST_ORDER, - G_LEVEL_ORDER -} GTraverseType; - -typedef gboolean (*GNodeTraverseFunc) (GNode *node, - gpointer data); -typedef void (*GNodeForeachFunc) (GNode *node, - gpointer data); - -/* N-way tree implementation - */ -struct _GNode -{ - gpointer data; - GNode *next; - GNode *prev; - GNode *parent; - GNode *children; -}; - -#define G_NODE_IS_ROOT(node) (((GNode*) (node))->parent == NULL && \ - ((GNode*) (node))->prev == NULL && \ - ((GNode*) (node))->next == NULL) -#define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL) - -void g_node_push_allocator (GAllocator *allocator); -void g_node_pop_allocator (void); -GNode* g_node_new (gpointer data); -void g_node_destroy (GNode *root); -void g_node_unlink (GNode *node); -GNode* g_node_copy (GNode *node); -GNode* g_node_insert (GNode *parent, - gint position, - GNode *node); -GNode* g_node_insert_before (GNode *parent, - GNode *sibling, - GNode *node); -GNode* g_node_insert_after (GNode *parent, - GNode *sibling, - GNode *node); -GNode* g_node_prepend (GNode *parent, - GNode *node); -guint g_node_n_nodes (GNode *root, - GTraverseFlags flags); -GNode* g_node_get_root (GNode *node); -gboolean g_node_is_ancestor (GNode *node, - GNode *descendant); -guint g_node_depth (GNode *node); -GNode* g_node_find (GNode *root, - GTraverseType order, - GTraverseFlags flags, - gpointer data); - -/* convenience macros */ -#define g_node_append(parent, node) \ - g_node_insert_before ((parent), NULL, (node)) -#define g_node_insert_data(parent, position, data) \ - g_node_insert ((parent), (position), g_node_new (data)) -#define g_node_insert_data_before(parent, sibling, data) \ - g_node_insert_before ((parent), (sibling), g_node_new (data)) -#define g_node_prepend_data(parent, data) \ - g_node_prepend ((parent), g_node_new (data)) -#define g_node_append_data(parent, data) \ - g_node_insert_before ((parent), NULL, g_node_new (data)) - -/* traversal function, assumes that `node' is root - * (only traverses `node' and its subtree). - * this function is just a high level interface to - * low level traversal functions, optimized for speed. - */ -void g_node_traverse (GNode *root, - GTraverseType order, - GTraverseFlags flags, - gint max_depth, - GNodeTraverseFunc func, - gpointer data); - -/* return the maximum tree height starting with `node', this is an expensive - * operation, since we need to visit all nodes. this could be shortened by - * adding `guint height' to struct _GNode, but then again, this is not very - * often needed, and would make g_node_insert() more time consuming. - */ -guint g_node_max_height (GNode *root); - -void g_node_children_foreach (GNode *node, - GTraverseFlags flags, - GNodeForeachFunc func, - gpointer data); -void g_node_reverse_children (GNode *node); -guint g_node_n_children (GNode *node); -GNode* g_node_nth_child (GNode *node, - guint n); -GNode* g_node_last_child (GNode *node); -GNode* g_node_find_child (GNode *node, - GTraverseFlags flags, - gpointer data); -gint g_node_child_position (GNode *node, - GNode *child); -gint g_node_child_index (GNode *node, - gpointer data); - -GNode* g_node_first_sibling (GNode *node); -GNode* g_node_last_sibling (GNode *node); - -#define g_node_prev_sibling(node) ((node) ? \ - ((GNode*) (node))->prev : NULL) -#define g_node_next_sibling(node) ((node) ? \ - ((GNode*) (node))->next : NULL) -#define g_node_first_child(node) ((node) ? \ - ((GNode*) (node))->children : NULL) - -G_END_DECLS - -#endif /* __G_NODE_H__ */ diff --git a/gobject/Makefile.am b/gobject/Makefile.am index 22126089e..f018ea165 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -6,12 +6,13 @@ INCLUDES = @STRIP_BEGIN@ \ -DG_LOG_DOMAIN=g_log_domain_gruntime \ -I$(top_srcdir) \ + -I$(top_srcdir)/glib \ -I$(top_builddir) \ @GLIB_DEBUG_FLAGS@ \ -DG_DISABLE_CONST_RETURNS \ @STRIP_END@ -libglib = $(top_builddir)/libglib-1.3.la +libglib = $(top_builddir)/glib/libglib-1.3.la # libraries to compile and install lib_LTLIBRARIES = libgobject-1.3.la diff --git a/gpattern.c b/gpattern.c deleted file mode 100644 index a149273a0..000000000 --- a/gpattern.c +++ /dev/null @@ -1,300 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997, 1999 Peter Mattis, Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#include "gpattern.h" - -#include "gmacros.h" -#include "gmessages.h" -#include "gmem.h" -#include "gutils.h" /* inline hassle */ -#include <string.h> - - -/* --- functions --- */ -static inline gboolean -g_pattern_ph_match (const gchar *match_pattern, - const gchar *match_string) -{ - register const gchar *pattern, *string; - register gchar ch; - - pattern = match_pattern; - string = match_string; - - ch = *pattern; - pattern++; - while (ch) - { - switch (ch) - { - case '?': - if (!*string) - return FALSE; - string++; - break; - - case '*': - do - { - ch = *pattern; - pattern++; - if (ch == '?') - { - if (!*string) - return FALSE; - string++; - } - } - while (ch == '*' || ch == '?'); - if (!ch) - return TRUE; - do - { - while (ch != *string) - { - if (!*string) - return FALSE; - string++; - } - string++; - if (g_pattern_ph_match (pattern, string)) - return TRUE; - } - while (*string); - break; - - default: - if (ch == *string) - string++; - else - return FALSE; - break; - } - - ch = *pattern; - pattern++; - } - - return *string == 0; -} - -gboolean -g_pattern_match (GPatternSpec *pspec, - guint string_length, - const gchar *string, - const gchar *string_reversed) -{ - g_return_val_if_fail (pspec != NULL, FALSE); - g_return_val_if_fail (string != NULL, FALSE); - g_return_val_if_fail (string_reversed != NULL, FALSE); - - switch (pspec->match_type) - { - case G_MATCH_ALL: - return g_pattern_ph_match (pspec->pattern, string); - - case G_MATCH_ALL_TAIL: - return g_pattern_ph_match (pspec->pattern_reversed, string_reversed); - - case G_MATCH_HEAD: - if (pspec->pattern_length > string_length) - return FALSE; - else if (pspec->pattern_length == string_length) - return strcmp (pspec->pattern, string) == 0; - else if (pspec->pattern_length) - return strncmp (pspec->pattern, string, pspec->pattern_length) == 0; - else - return TRUE; - - case G_MATCH_TAIL: - if (pspec->pattern_length > string_length) - return FALSE; - else if (pspec->pattern_length == string_length) - return strcmp (pspec->pattern_reversed, string_reversed) == 0; - else if (pspec->pattern_length) - return strncmp (pspec->pattern_reversed, - string_reversed, - pspec->pattern_length) == 0; - else - return TRUE; - - case G_MATCH_EXACT: - if (pspec->pattern_length != string_length) - return FALSE; - else - return strcmp (pspec->pattern_reversed, string_reversed) == 0; - - default: - g_return_val_if_fail (pspec->match_type < G_MATCH_LAST, FALSE); - return FALSE; - } -} - -GPatternSpec* -g_pattern_spec_new (const gchar *pattern) -{ - GPatternSpec *pspec; - gchar *p, *t; - const gchar *h; - guint hw = 0, tw = 0, hj = 0, tj = 0; - - g_return_val_if_fail (pattern != NULL, NULL); - - pspec = g_new (GPatternSpec, 1); - pspec->pattern_length = strlen (pattern); - pspec->pattern = strcpy (g_new (gchar, pspec->pattern_length + 1), pattern); - pspec->pattern_reversed = g_new (gchar, pspec->pattern_length + 1); - t = pspec->pattern_reversed + pspec->pattern_length; - *(t--) = 0; - h = pattern; - while (t >= pspec->pattern_reversed) - { - register gchar c = *(h++); - - if (c == '*') - { - if (t < h) - hw++; - else - tw++; - } - else if (c == '?') - { - if (t < h) - hj++; - else - tj++; - } - - *(t--) = c; - } - pspec->match_type = hw > tw || (hw == tw && hj > tj) ? G_MATCH_ALL_TAIL : G_MATCH_ALL; - - if (hj || tj) - return pspec; - - if (hw == 0 && tw == 0) - { - pspec->match_type = G_MATCH_EXACT; - return pspec; - } - - if (hw) - { - p = pspec->pattern; - while (*p == '*') - p++; - if (p > pspec->pattern && !strchr (p, '*')) - { - gchar *tmp; - - pspec->match_type = G_MATCH_TAIL; - pspec->pattern_length = strlen (p); - tmp = pspec->pattern; - pspec->pattern = strcpy (g_new (gchar, pspec->pattern_length + 1), p); - g_free (tmp); - g_free (pspec->pattern_reversed); - pspec->pattern_reversed = g_new (gchar, pspec->pattern_length + 1); - t = pspec->pattern_reversed + pspec->pattern_length; - *(t--) = 0; - h = pspec->pattern; - while (t >= pspec->pattern_reversed) - *(t--) = *(h++); - return pspec; - } - } - - if (tw) - { - p = pspec->pattern_reversed; - while (*p == '*') - p++; - if (p > pspec->pattern_reversed && !strchr (p, '*')) - { - gchar *tmp; - - pspec->match_type = G_MATCH_HEAD; - pspec->pattern_length = strlen (p); - tmp = pspec->pattern_reversed; - pspec->pattern_reversed = strcpy (g_new (gchar, pspec->pattern_length + 1), p); - g_free (tmp); - g_free (pspec->pattern); - pspec->pattern = g_new (gchar, pspec->pattern_length + 1); - t = pspec->pattern + pspec->pattern_length; - *(t--) = 0; - h = pspec->pattern_reversed; - while (t >= pspec->pattern) - *(t--) = *(h++); - } - } - - return pspec; -} - -gboolean -g_pattern_match_string (GPatternSpec *pspec, - const gchar *string) -{ - gchar *string_reversed, *t; - const gchar *h; - guint length; - gboolean ergo; - - g_return_val_if_fail (pspec != NULL, FALSE); - g_return_val_if_fail (string != NULL, FALSE); - - length = strlen (string); - string_reversed = g_new (gchar, length + 1); - t = string_reversed + length; - *(t--) = 0; - h = string; - while (t >= string_reversed) - *(t--) = *(h++); - - ergo = g_pattern_match (pspec, length, string, string_reversed); - g_free (string_reversed); - - return ergo; -} - -gboolean -g_pattern_match_simple (const gchar *pattern, - const gchar *string) -{ - GPatternSpec *pspec; - gboolean ergo; - - g_return_val_if_fail (pattern != NULL, FALSE); - g_return_val_if_fail (string != NULL, FALSE); - - pspec = g_pattern_spec_new (pattern); - ergo = g_pattern_match_string (pspec, string); - g_pattern_spec_free (pspec); - - return ergo; -} - -void -g_pattern_spec_free (GPatternSpec *pspec) -{ - g_return_if_fail (pspec != NULL); - - g_free (pspec->pattern); - g_free (pspec->pattern_reversed); - g_free (pspec); -} diff --git a/gpattern.h b/gpattern.h deleted file mode 100644 index add239c6c..000000000 --- a/gpattern.h +++ /dev/null @@ -1,58 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997, 1999 Peter Mattis, Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __G_PATTERN_H__ -#define __G_PATTERN_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef enum -{ - G_MATCH_ALL, /* "*A?A*" */ - G_MATCH_ALL_TAIL, /* "*A?AA" */ - G_MATCH_HEAD, /* "AAAA*" */ - G_MATCH_TAIL, /* "*AAAA" */ - G_MATCH_EXACT, /* "AAAAA" */ - G_MATCH_LAST -} GMatchType; - -typedef struct _GPatternSpec GPatternSpec; -struct _GPatternSpec -{ - GMatchType match_type; - guint pattern_length; - gchar *pattern; - gchar *pattern_reversed; -}; - -GPatternSpec* g_pattern_spec_new (const gchar *pattern); -void g_pattern_spec_free (GPatternSpec *pspec); -gboolean g_pattern_match (GPatternSpec *pspec, - guint string_length, - const gchar *string, - const gchar *string_reversed); -gboolean g_pattern_match_string (GPatternSpec *pspec, - const gchar *string); -gboolean g_pattern_match_simple (const gchar *pattern, - const gchar *string); - -G_END_DECLS - -#endif /* __G_PATTERN_H__ */ diff --git a/gprimes.c b/gprimes.c deleted file mode 100644 index 0d63bb76c..000000000 --- a/gprimes.c +++ /dev/null @@ -1,83 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "glib.h" - -static const guint g_primes[] = -{ - 11, - 19, - 37, - 73, - 109, - 163, - 251, - 367, - 557, - 823, - 1237, - 1861, - 2777, - 4177, - 6247, - 9371, - 14057, - 21089, - 31627, - 47431, - 71143, - 106721, - 160073, - 240101, - 360163, - 540217, - 810343, - 1215497, - 1823231, - 2734867, - 4102283, - 6153409, - 9230113, - 13845163, -}; - -static const guint g_nprimes = sizeof (g_primes) / sizeof (g_primes[0]); - -guint -g_spaced_primes_closest (guint num) -{ - gint i; - - for (i = 0; i < g_nprimes; i++) - if (g_primes[i] > num) - return g_primes[i]; - - return g_primes[g_nprimes - 1]; -} diff --git a/gprimes.h b/gprimes.h deleted file mode 100644 index daa1598c2..000000000 --- a/gprimes.h +++ /dev/null @@ -1,47 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_PRIMES_H__ -#define __G_PRIMES_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -/* Prime numbers. - */ - -/* This function returns prime numbers spaced by approximately 1.5-2.0 - * and is for use in resizing data structures which prefer - * prime-valued sizes. The closest spaced prime function returns the - * next largest prime, or the highest it knows about which is about - * MAXINT/4. - */ -guint g_spaced_primes_closest (guint num) G_GNUC_CONST; - -G_END_DECLS - -#endif /* __G_PRIMES_H__ */ diff --git a/gqsort.c b/gqsort.c deleted file mode 100644 index a100735ac..000000000 --- a/gqsort.c +++ /dev/null @@ -1,282 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc. - * Copyright (C) 2000 Eazel, Inc. - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * This file was originally part of the GNU C Library, and was modified to allow - * user data to be passed in to the sorting function. - * - * Written by Douglas C. Schmidt (schmidt@ics.uci.edu). - * Modified by Maciej Stachowiak (mjs@eazel.com) - * - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with GLib - * at ftp://ftp.gtk.org/pub/gtk/. - */ - -#include <string.h> - -#include "glib.h" - -/* Byte-wise swap two items of size SIZE. */ -#define SWAP(a, b, size) \ - do \ - { \ - register size_t __size = (size); \ - register char *__a = (a), *__b = (b); \ - do \ - { \ - char __tmp = *__a; \ - *__a++ = *__b; \ - *__b++ = __tmp; \ - } while (--__size > 0); \ - } while (0) - -/* Discontinue quicksort algorithm when partition gets below this size. - This particular magic number was chosen to work best on a Sun 4/260. */ -#define MAX_THRESH 4 - -/* Stack node declarations used to store unfulfilled partition obligations. */ -typedef struct -{ - char *lo; - char *hi; -} -stack_node; - -/* The next 4 #defines implement a very fast in-line stack abstraction. */ -#define STACK_SIZE (8 * sizeof(unsigned long int)) -#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) -#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) -#define STACK_NOT_EMPTY (stack < top) - - -/* Order size using quicksort. This implementation incorporates - * four optimizations discussed in Sedgewick: - * - * 1. Non-recursive, using an explicit stack of pointer that store the next - * array partition to sort. To save time, this maximum amount of space - * required to store an array of MAX_INT is allocated on the stack. Assuming - * a 32-bit integer, this needs only 32 * sizeof(stack_node) == 136 bits. - * Pretty cheap, actually. - * - * 2. Chose the pivot element using a median-of-three decision tree. This - * reduces the probability of selecting a bad pivot value and eliminates - * certain * extraneous comparisons. - * - * 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving insertion - * sort to order the MAX_THRESH items within each partition. This is a big - * win, since insertion sort is faster for small, mostly sorted array - * segments. - * - * 4. The larger of the two sub-partitions is always pushed onto the stack - * first, with the algorithm then concentrating on the smaller partition. - * This *guarantees* no more than log (n) stack size is needed (actually O(1) - * in this case)! - */ - -/** - * g_qsort_with_data: - * @pbase: start of array to sort - * @total_elems: elements in the array - * @size: size of each element - * @compare_func: function to compare elements - * @user_data: data to pass to @compare_func - * - * This is just like the standard C qsort() function, but - * the comparison routine accepts a user data argument. - * - **/ -void -g_qsort_with_data (gconstpointer pbase, - gint total_elems, - size_t size, - GCompareDataFunc compare_func, - gpointer user_data) -{ - register char *base_ptr = (char *) pbase; - - /* Allocating SIZE bytes for a pivot buffer facilitates a better - * algorithm below since we can do comparisons directly on the pivot. - */ - char *pivot_buffer = (char *) alloca (size); - const size_t max_thresh = MAX_THRESH * size; - - g_return_if_fail (total_elems > 0); - g_return_if_fail (pbase != NULL); - g_return_if_fail (compare_func != NULL); - - if (total_elems > MAX_THRESH) - { - char *lo = base_ptr; - char *hi = &lo[size * (total_elems - 1)]; - /* Largest size needed for 32-bit int!!! */ - stack_node stack[STACK_SIZE]; - stack_node *top = stack + 1; - - while (STACK_NOT_EMPTY) - { - char *left_ptr; - char *right_ptr; - - char *pivot = pivot_buffer; - - /* Select median value from among LO, MID, and HI. Rearrange - * LO and HI so the three values are sorted. This lowers the - * probability of picking a pathological pivot value and - * skips a comparison for both the LEFT_PTR and RIGHT_PTR. */ - - char *mid = lo + size * ((hi - lo) / size >> 1); - - if ((*compare_func) ((void *) mid, (void *) lo, user_data) < 0) - SWAP (mid, lo, size); - if ((*compare_func) ((void *) hi, (void *) mid, user_data) < 0) - SWAP (mid, hi, size); - else - goto jump_over; - if ((*compare_func) ((void *) mid, (void *) lo, user_data) < 0) - SWAP (mid, lo, size); - jump_over:; - memcpy (pivot, mid, size); - pivot = pivot_buffer; - - left_ptr = lo + size; - right_ptr = hi - size; - - /* Here's the famous ``collapse the walls'' section of quicksort. - * Gotta like those tight inner loops! They are the main reason - * that this algorithm runs much faster than others. */ - do - { - while ((*compare_func) - ((void *) left_ptr, (void *) pivot, - user_data) < 0) - left_ptr += size; - - while ((*compare_func) - ((void *) pivot, (void *) right_ptr, - user_data) < 0) - right_ptr -= size; - - if (left_ptr < right_ptr) - { - SWAP (left_ptr, right_ptr, size); - left_ptr += size; - right_ptr -= size; - } - else if (left_ptr == right_ptr) - { - left_ptr += size; - right_ptr -= size; - break; - } - } - while (left_ptr <= right_ptr); - - /* Set up pointers for next iteration. First determine whether - * left and right partitions are below the threshold size. If so, - * ignore one or both. Otherwise, push the larger partition's - * bounds on the stack and continue sorting the smaller one. */ - - if ((size_t) (right_ptr - lo) <= max_thresh) - { - if ((size_t) (hi - left_ptr) <= max_thresh) - /* Ignore both small partitions. */ - POP (lo, hi); - else - /* Ignore small left partition. */ - lo = left_ptr; - } - else if ((size_t) (hi - left_ptr) <= max_thresh) - /* Ignore small right partition. */ - hi = right_ptr; - else if ((right_ptr - lo) > (hi - left_ptr)) - { - /* Push larger left partition indices. */ - PUSH (lo, right_ptr); - lo = left_ptr; - - } - else - { - /* Push larger right partition indices. */ - PUSH (left_ptr, hi); - hi = right_ptr; - } - } - } - - /* Once the BASE_PTR array is partially sorted by quicksort the rest - * is completely sorted using insertion sort, since this is efficient - * for partitions below MAX_THRESH size. BASE_PTR points to the beginning - * of the array to sort, and END_PTR points at the very last element in - * the array (*not* one beyond it!). */ - - { - char *const end_ptr = &base_ptr[size * (total_elems - 1)]; - char *tmp_ptr = base_ptr; - char *thresh = MIN (end_ptr, base_ptr + max_thresh); - register char *run_ptr; - - /* Find smallest element in first threshold and place it at the - * array's beginning. This is the smallest array element, - * and the operation speeds up insertion sort's inner loop. */ - - for (run_ptr = tmp_ptr + size; run_ptr <= thresh; - run_ptr += - size) if ((*compare_func) ((void *) run_ptr, (void *) tmp_ptr, - user_data) < 0) - tmp_ptr = run_ptr; - - if (tmp_ptr != base_ptr) - SWAP (tmp_ptr, base_ptr, size); - - /* Insertion sort, running from left-hand-side up to right-hand-side. */ - - run_ptr = base_ptr + size; - while ((run_ptr += size) <= end_ptr) - { - tmp_ptr = run_ptr - size; - while ((*compare_func) - ((void *) run_ptr, (void *) tmp_ptr, - user_data) < 0) - tmp_ptr -= size; - - tmp_ptr += size; - if (tmp_ptr != run_ptr) - { - char *trav; - - trav = run_ptr + size; - while (--trav >= run_ptr) - { - char c = *trav; - char *hi, *lo; - - for (hi = lo = trav; - (lo -= size) >= tmp_ptr; hi = lo) - *hi = *lo; - *hi = c; - } - } - } - } -} diff --git a/gqsort.h b/gqsort.h deleted file mode 100644 index d946e80ca..000000000 --- a/gqsort.h +++ /dev/null @@ -1,44 +0,0 @@ - /* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - - -#ifndef __G_QSORT_H__ -#define __G_QSORT_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -void g_qsort_with_data (gconstpointer pbase, - gint total_elems, - size_t size, - GCompareDataFunc compare_func, - gpointer user_data); - -G_END_DECLS - -#endif /* __G_QSORT_H__ */ - diff --git a/gquark.h b/gquark.h deleted file mode 100644 index e8756ef61..000000000 --- a/gquark.h +++ /dev/null @@ -1,46 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_QUARK_H__ -#define __G_QUARK_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef guint32 GQuark; - -/* Quarks (string<->id association) - */ -GQuark g_quark_try_string (const gchar *string); -GQuark g_quark_from_static_string (const gchar *string); -GQuark g_quark_from_string (const gchar *string); -G_CONST_RETURN gchar* g_quark_to_string (GQuark quark) G_GNUC_CONST; - -G_END_DECLS - -#endif /* __G_QUARK_H__ */ - diff --git a/gqueue.c b/gqueue.c deleted file mode 100644 index b15adb4f9..000000000 --- a/gqueue.c +++ /dev/null @@ -1,263 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * GQueue: Double ended queue implementation, piggy backed on GList. - * Copyright (C) 1998 Tim Janik - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glib.h" - - -G_LOCK_DEFINE_STATIC (queue_memchunk); -static GMemChunk *queue_memchunk = NULL; -static GTrashStack *free_queue_nodes = NULL; - -GQueue* -g_queue_new (void) -{ - GQueue *queue; - - G_LOCK (queue_memchunk); - queue = g_trash_stack_pop (&free_queue_nodes); - - if (!queue) - { - if (!queue_memchunk) - queue_memchunk = g_mem_chunk_new ("GLib GQueue chunk", - sizeof (GNode), - sizeof (GNode) * 128, - G_ALLOC_ONLY); - queue = g_chunk_new (GQueue, queue_memchunk); - } - G_UNLOCK (queue_memchunk); - - queue->head = NULL; - queue->tail = NULL; - queue->length = 0; - - return queue; -} - -void -g_queue_free (GQueue *queue) -{ - g_return_if_fail (queue != NULL); - - g_list_free (queue->head); - -#ifdef ENABLE_GC_FRIENDLY - queue->head = NULL; - queue->tail = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - G_LOCK (queue_memchunk); - g_trash_stack_push (&free_queue_nodes, queue); - G_UNLOCK (queue_memchunk); -} - -void -g_queue_push_head (GQueue *queue, - gpointer data) -{ - g_return_if_fail (queue != NULL); - - queue->head = g_list_prepend (queue->head, data); - if (!queue->tail) - queue->tail = queue->head; - queue->length++; -} - -void -g_queue_push_head_link (GQueue *queue, - GList *link) -{ - g_return_if_fail (queue != NULL); - g_return_if_fail (link != NULL); - g_return_if_fail (link->prev == NULL); - g_return_if_fail (link->next == NULL); - - link->next = queue->head; - if (queue->head) - queue->head->prev = link; - else - queue->tail = link; - queue->head = link; - queue->length++; -} - -void -g_queue_push_tail (GQueue *queue, - gpointer data) -{ - g_return_if_fail (queue != NULL); - - queue->tail = g_list_append (queue->tail, data); - if (queue->tail->next) - queue->tail = queue->tail->next; - else - queue->head = queue->tail; - queue->length++; -} - -void -g_queue_push_tail_link (GQueue *queue, - GList *link) -{ - g_return_if_fail (queue != NULL); - g_return_if_fail (link != NULL); - g_return_if_fail (link->prev == NULL); - g_return_if_fail (link->next == NULL); - - link->prev = queue->tail; - if (queue->tail) - queue->tail->next = link; - else - queue->head = link; - queue->tail = link; - queue->length++; -} - -gpointer -g_queue_pop_head (GQueue *queue) -{ - g_return_val_if_fail (queue != NULL, NULL); - - if (queue->head) - { - GList *node = queue->head; - gpointer data = node->data; - - queue->head = node->next; - if (queue->head) - queue->head->prev = NULL; - else - queue->tail = NULL; - g_list_free_1 (node); - queue->length--; - - return data; - } - - return NULL; -} - -GList* -g_queue_pop_head_link (GQueue *queue) -{ - g_return_val_if_fail (queue != NULL, NULL); - - if (queue->head) - { - GList *node = queue->head; - - queue->head = node->next; - if (queue->head) - { - queue->head->prev = NULL; - node->next = NULL; - } - else - queue->tail = NULL; - queue->length--; - - return node; - } - - return NULL; -} - -gpointer -g_queue_pop_tail (GQueue *queue) -{ - g_return_val_if_fail (queue != NULL, NULL); - - if (queue->tail) - { - GList *node = queue->tail; - gpointer data = node->data; - - queue->tail = node->prev; - if (queue->tail) - queue->tail->next = NULL; - else - queue->head = NULL; - queue->length--; - g_list_free_1 (node); - - return data; - } - - return NULL; -} - -GList* -g_queue_pop_tail_link (GQueue *queue) -{ - g_return_val_if_fail (queue != NULL, NULL); - - if (queue->tail) - { - GList *node = queue->tail; - - queue->tail = node->prev; - if (queue->tail) - { - queue->tail->next = NULL; - node->prev = NULL; - } - else - queue->head = NULL; - queue->length--; - - return node; - } - - return NULL; -} - -gboolean -g_queue_is_empty (GQueue *queue) -{ - g_return_val_if_fail (queue != NULL, TRUE); - - return queue->head == NULL; -} - -gpointer -g_queue_peek_head (GQueue *queue) -{ - g_return_val_if_fail (queue != NULL, NULL); - - return queue->head ? queue->head->data : NULL; -} - -gpointer -g_queue_peek_tail (GQueue *queue) -{ - g_return_val_if_fail (queue != NULL, NULL); - - return queue->tail ? queue->tail->data : NULL; -} diff --git a/gqueue.h b/gqueue.h deleted file mode 100644 index b71b6d61e..000000000 --- a/gqueue.h +++ /dev/null @@ -1,65 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_QUEUE_H__ -#define __G_QUEUE_H__ - -#include <glist.h> - -G_BEGIN_DECLS - -typedef struct _GQueue GQueue; - -struct _GQueue -{ - GList *head; - GList *tail; - guint length; -}; - -/* Queues - */ -GQueue* g_queue_new (void); -void g_queue_free (GQueue *queue); -void g_queue_push_head (GQueue *queue, - gpointer data); -void g_queue_push_tail (GQueue *queue, - gpointer data); -gpointer g_queue_pop_head (GQueue *queue); -gpointer g_queue_pop_tail (GQueue *queue); -gboolean g_queue_is_empty (GQueue *queue); -gpointer g_queue_peek_head (GQueue *queue); -gpointer g_queue_peek_tail (GQueue *queue); -void g_queue_push_head_link (GQueue *queue, - GList *link); -void g_queue_push_tail_link (GQueue *queue, - GList *link); -GList* g_queue_pop_head_link (GQueue *queue); -GList* g_queue_pop_tail_link (GQueue *queue); - -G_END_DECLS - -#endif /* __G_QUEUE_H__ */ diff --git a/grand.c b/grand.c deleted file mode 100644 index 2a60e5bd5..000000000 --- a/grand.c +++ /dev/null @@ -1,403 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* Originally developed and coded by Makoto Matsumoto and Takuji - * Nishimura. Please mail <matumoto@math.keio.ac.jp>, if you're using - * code from this file in your own programs or libraries. - * Further information on the Mersenne Twister can be found at - * http://www.math.keio.ac.jp/~matumoto/emt.html - * This code was adapted to glib by Sebastian Wilhelmi <wilhelmi@ira.uka.de>. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include <glib.h> -#include <math.h> -#include <stdio.h> - -G_LOCK_DEFINE_STATIC (global_random); -static GRand* global_random = NULL; - -/* Period parameters */ -#define N 624 -#define M 397 -#define MATRIX_A 0x9908b0df /* constant vector a */ -#define UPPER_MASK 0x80000000 /* most significant w-r bits */ -#define LOWER_MASK 0x7fffffff /* least significant r bits */ - -/* Tempering parameters */ -#define TEMPERING_MASK_B 0x9d2c5680 -#define TEMPERING_MASK_C 0xefc60000 -#define TEMPERING_SHIFT_U(y) (y >> 11) -#define TEMPERING_SHIFT_S(y) (y << 7) -#define TEMPERING_SHIFT_T(y) (y << 15) -#define TEMPERING_SHIFT_L(y) (y >> 18) - -struct _GRand -{ - guint32 mt[N]; /* the array for the state vector */ - guint mti; -}; - -/** - * g_rand_new_with_seed: - * @seed: a value to initialize the random number generator. - * - * Creates a new random number generator initialized with @seed. - * - * Return value: the new #GRand. - **/ -GRand* -g_rand_new_with_seed (guint32 seed) -{ - GRand *rand = g_new0 (GRand, 1); - g_rand_set_seed (rand, seed); - return rand; -} - -/** - * g_rand_new: - * - * Creates a new random number generator initialized with a seed taken - * either from /dev/urandom (if existing) or from the current time (as - * a fallback). - * - * Return value: the new #GRand. - **/ -GRand* -g_rand_new (void) -{ - guint32 seed; - GTimeVal now; - static gboolean dev_urandom_exists = TRUE; - - if (dev_urandom_exists) - { - FILE* dev_urandom = fopen("/dev/urandom", "rb"); - if (dev_urandom) - { - if (fread (&seed, sizeof (seed), 1, dev_urandom) != 1) - dev_urandom_exists = FALSE; - fclose (dev_urandom); - } - else - dev_urandom_exists = FALSE; - } - if (!dev_urandom_exists) - { - g_get_current_time (&now); - seed = now.tv_sec ^ now.tv_usec; - } - - return g_rand_new_with_seed (seed); -} - -/** - * g_rand_free: - * @rand: a #GRand. - * - * Frees the memory allocated for the #GRand. - **/ -void -g_rand_free (GRand* rand) -{ - g_return_if_fail (rand != NULL); - - g_free (rand); -} - -/** - * g_rand_set_seed: - * @rand: a #GRand. - * @seed: a value to reinitialize the random number generator. - * - * Sets the seed for the random number generator #GRand to @seed. - **/ -void -g_rand_set_seed (GRand* rand, guint32 seed) -{ - g_return_if_fail (rand != NULL); - - /* setting initial seeds to mt[N] using */ - /* the generator Line 25 of Table 1 in */ - /* [KNUTH 1981, The Art of Computer Programming */ - /* Vol. 2 (2nd Ed.), pp102] */ - - if (seed == 0) /* This would make the PRNG procude only zeros */ - seed = 0x6b842128; /* Just set it to another number */ - - rand->mt[0]= seed & 0xffffffff; - for (rand->mti=1; rand->mti<N; rand->mti++) - rand->mt[rand->mti] = (69069 * rand->mt[rand->mti-1]) & 0xffffffff; -} - -/** - * g_rand_int: - * @rand: a #GRand. - * - * Return the next random #guint32 from @rand equaly distributed over - * the range [0..2^32-1]. - * - * Return value: A random number. - **/ -guint32 -g_rand_int (GRand* rand) -{ - guint32 y; - static const guint32 mag01[2]={0x0, MATRIX_A}; - /* mag01[x] = x * MATRIX_A for x=0,1 */ - - g_return_val_if_fail (rand != NULL, 0); - - if (rand->mti >= N) { /* generate N words at one time */ - int kk; - - for (kk=0;kk<N-M;kk++) { - y = (rand->mt[kk]&UPPER_MASK)|(rand->mt[kk+1]&LOWER_MASK); - rand->mt[kk] = rand->mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1]; - } - for (;kk<N-1;kk++) { - y = (rand->mt[kk]&UPPER_MASK)|(rand->mt[kk+1]&LOWER_MASK); - rand->mt[kk] = rand->mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1]; - } - y = (rand->mt[N-1]&UPPER_MASK)|(rand->mt[0]&LOWER_MASK); - rand->mt[N-1] = rand->mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1]; - - rand->mti = 0; - } - - y = rand->mt[rand->mti++]; - y ^= TEMPERING_SHIFT_U(y); - y ^= TEMPERING_SHIFT_S(y) & TEMPERING_MASK_B; - y ^= TEMPERING_SHIFT_T(y) & TEMPERING_MASK_C; - y ^= TEMPERING_SHIFT_L(y); - - return y; -} - -/* transform [0..2^32] -> [0..1] */ -#define G_RAND_DOUBLE_TRANSFORM 2.3283064365386962890625e-10 - -/** - * g_rand_int_range: - * @rand: a #GRand. - * @begin: lower closed bound of the interval. - * @end: upper open bound of the interval. - * - * Return the next random #gint32 from @rand equaly distributed over - * the range [@begin..@end-1]. - * - * Return value: A random number. - **/ -gint32 -g_rand_int_range (GRand* rand, gint32 begin, gint32 end) -{ - guint32 dist = end - begin; - guint32 random; - - g_return_val_if_fail (rand != NULL, begin); - g_return_val_if_fail (end > begin, begin); - - /* All tricks doing modulo calculations do not have a perfect - * distribution -> We must use the slower way through gdouble for - * maximal quality. */ - - if (dist <= 0x10000L) /* 2^16 */ - { - /* This method, which only calls g_rand_int once is only good - * for (end - begin) <= 2^16, because we only have 32 bits set - * from the one call to g_rand_int (). */ - - /* we are using (trans + trans * trans), because g_rand_int only - * covers [0..2^32-1] and thus g_rand_int * trans only covers - * [0..1-2^-32], but the biggest double < 1 is 1-2^-52. - */ - - gdouble double_rand = g_rand_int (rand) * - (G_RAND_DOUBLE_TRANSFORM + - G_RAND_DOUBLE_TRANSFORM * G_RAND_DOUBLE_TRANSFORM); - - random = (gint32) (double_rand * dist); - } - else - { - /* Now we use g_rand_double_range (), which will set 52 bits for - us, so that it is safe to round and still get a decent - distribution */ - random = (gint32) g_rand_double_range (rand, 0, dist); - } - - return begin + random; -} - -/** - * g_rand_double: - * @rand: a #GRand. - * - * Return the next random #gdouble from @rand equaly distributed over - * the range [0..1). - * - * Return value: A random number. - **/ -gdouble -g_rand_double (GRand* rand) -{ - /* We set all 52 bits after the point for this, not only the first - 32. Thats why we need two calls to g_rand_int */ - gdouble retval = g_rand_int (rand) * G_RAND_DOUBLE_TRANSFORM; - retval = (retval + g_rand_int (rand)) * G_RAND_DOUBLE_TRANSFORM; - - /* The following might happen due to very bad rounding luck, but - * actually this should be more than rare, we just try again then */ - if (retval >= 1.0) - return g_rand_double (rand); - - return retval; -} - -/** - * g_rand_double_range: - * @rand: a #GRand. - * @begin: lower closed bound of the interval. - * @end: upper open bound of the interval. - * - * Return the next random #gdouble from @rand equaly distributed over - * the range [@begin..@end). - * - * Return value: A random number. - **/ -gdouble -g_rand_double_range (GRand* rand, gdouble begin, gdouble end) -{ - return g_rand_double (rand) * (end - begin) + begin; -} - -/** - * g_random_int: - * - * Return a random #guint32 equaly distributed over the range - * [0..2^32-1]. - * - * Return value: A random number. - **/ -guint32 -g_random_int (void) -{ - guint32 result; - G_LOCK (global_random); - if (!global_random) - global_random = g_rand_new (); - - result = g_rand_int (global_random); - G_UNLOCK (global_random); - return result; -} - -/** - * g_random_int_range: - * @begin: lower closed bound of the interval. - * @end: upper open bound of the interval. - * - * Return a random #gint32 equaly distributed over the range - * [@begin..@end-1]. - * - * Return value: A random number. - **/ -gint32 -g_random_int_range (gint32 begin, gint32 end) -{ - gint32 result; - G_LOCK (global_random); - if (!global_random) - global_random = g_rand_new (); - - result = g_rand_int_range (global_random, begin, end); - G_UNLOCK (global_random); - return result; -} - -/** - * g_random_double: - * - * Return a random #gdouble equaly distributed over the range [0..1). - * - * Return value: A random number. - **/ -gdouble -g_random_double (void) -{ - double result; - G_LOCK (global_random); - if (!global_random) - global_random = g_rand_new (); - - result = g_rand_double (global_random); - G_UNLOCK (global_random); - return result; -} - -/** - * g_random_double_range: - * @begin: lower closed bound of the interval. - * @end: upper open bound of the interval. - * - * Return a random #gdouble equaly distributed over the range [@begin..@end). - * - * Return value: A random number. - **/ -gdouble -g_random_double_range (gdouble begin, gdouble end) -{ - double result; - G_LOCK (global_random); - if (!global_random) - global_random = g_rand_new (); - - result = g_rand_double_range (global_random, begin, end); - G_UNLOCK (global_random); - return result; -} - -/** - * g_random_set_seed: - * @seed: a value to reinitialize the global random number generator. - * - * Sets the seed for the global random number generator, which is used - * by te g_random_* functions, to @seed. - **/ -void -g_random_set_seed (guint32 seed) -{ - G_LOCK (global_random); - if (!global_random) - global_random = g_rand_new_with_seed (seed); - else - g_rand_set_seed (global_random, seed); - G_UNLOCK (global_random); -} - diff --git a/grand.h b/grand.h deleted file mode 100644 index 5accc1ae1..000000000 --- a/grand.h +++ /dev/null @@ -1,82 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_RAND_H__ -#define __G_RAND_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef struct _GRand GRand; - -/* GRand - a good and fast random number generator: Mersenne Twister - * see http://www.math.keio.ac.jp/~matumoto/emt.html for more info. - * The range functions return a value in the intervall [begin, end). - * int -> [0..2^32-1] - * int_range -> [begin..end-1] - * double -> [0..1) - * double_range -> [begin..end) - */ - -GRand* g_rand_new_with_seed (guint32 seed); -GRand* g_rand_new (void); -void g_rand_free (GRand *rand); - -void g_rand_set_seed (GRand *rand, - guint32 seed); - -#define g_rand_boolean(rand) ((g_rand_int (rand) & (1 << 15)) != 0) - -guint32 g_rand_int (GRand *rand); -gint32 g_rand_int_range (GRand *rand, - gint32 begin, - gint32 end); -gdouble g_rand_double (GRand *rand); -gdouble g_rand_double_range (GRand *rand, - gdouble begin, - gdouble end); - -void g_random_set_seed (guint32 seed); - -#define g_random_boolean() ((g_random_int () & (1 << 15)) != 0) - -guint32 g_random_int (void); -gint32 g_random_int_range (gint32 begin, - gint32 end); -gdouble g_random_double (void); -gdouble g_random_double_range (gdouble begin, - gdouble end); - -G_END_DECLS - -#endif /* __G_RAND_H__ */ - - - - - - diff --git a/grel.c b/grel.c deleted file mode 100644 index 41e732299..000000000 --- a/grel.c +++ /dev/null @@ -1,459 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "glib.h" -#include <stdarg.h> -#include <string.h> - -typedef struct _GRealRelation GRealRelation; -typedef struct _GRealTuples GRealTuples; - -struct _GRealRelation -{ - gint fields; - gint current_field; - - GHashTable *all_tuples; - GHashTable **hashed_tuple_tables; - GMemChunk *tuple_chunk; - - gint count; -}; - -struct _GRealTuples -{ - gint len; - gint width; - gpointer *data; -}; - -static gboolean -tuple_equal_2 (gconstpointer v_a, - gconstpointer v_b) -{ - gpointer* a = (gpointer*) v_a; - gpointer* b = (gpointer*) v_b; - - return a[0] == b[0] && a[1] == b[1]; -} - -static guint -tuple_hash_2 (gconstpointer v_a) -{ - gpointer* a = (gpointer*) v_a; - - return (gulong)a[0] ^ (gulong)a[1]; -} - -static GHashFunc -tuple_hash (gint fields) -{ - switch (fields) - { - case 2: - return tuple_hash_2; - default: - g_error ("no tuple hash for %d", fields); - } - - return NULL; -} - -static GEqualFunc -tuple_equal (gint fields) -{ - switch (fields) - { - case 2: - return tuple_equal_2; - default: - g_error ("no tuple equal for %d", fields); - } - - return NULL; -} - -GRelation* -g_relation_new (gint fields) -{ - GRealRelation* rel = g_new0 (GRealRelation, 1); - - rel->fields = fields; - rel->tuple_chunk = g_mem_chunk_new ("Relation Chunk", - fields * sizeof (gpointer), - fields * sizeof (gpointer) * 128, - G_ALLOC_AND_FREE); - rel->all_tuples = g_hash_table_new (tuple_hash (fields), tuple_equal (fields)); - rel->hashed_tuple_tables = g_new0 (GHashTable*, fields); - - return (GRelation*) rel; -} - -static void -g_relation_free_array (gpointer key, gpointer value, gpointer user_data) -{ - g_hash_table_destroy ((GHashTable*) value); -} - -void -g_relation_destroy (GRelation *relation) -{ - GRealRelation *rel = (GRealRelation *) relation; - gint i; - - if (rel) - { - g_hash_table_destroy (rel->all_tuples); - g_mem_chunk_destroy (rel->tuple_chunk); - - for (i = 0; i < rel->fields; i += 1) - { - if (rel->hashed_tuple_tables[i]) - { - g_hash_table_foreach (rel->hashed_tuple_tables[i], g_relation_free_array, NULL); - g_hash_table_destroy (rel->hashed_tuple_tables[i]); - } - } - - g_free (rel->hashed_tuple_tables); - g_free (rel); - } -} - -void -g_relation_index (GRelation *relation, - gint field, - GHashFunc hash_func, - GEqualFunc key_equal_func) -{ - GRealRelation *rel = (GRealRelation *) relation; - - g_return_if_fail (relation != NULL); - - g_return_if_fail (rel->count == 0 && rel->hashed_tuple_tables[field] == NULL); - - rel->hashed_tuple_tables[field] = g_hash_table_new (hash_func, key_equal_func); -} - -void -g_relation_insert (GRelation *relation, - ...) -{ - GRealRelation *rel = (GRealRelation *) relation; - gpointer* tuple = g_chunk_new (gpointer, rel->tuple_chunk); - va_list args; - gint i; - - va_start(args, relation); - - for (i = 0; i < rel->fields; i += 1) - tuple[i] = va_arg(args, gpointer); - - va_end(args); - - g_hash_table_insert (rel->all_tuples, tuple, tuple); - - rel->count += 1; - - for (i = 0; i < rel->fields; i += 1) - { - GHashTable *table; - gpointer key; - GHashTable *per_key_table; - - table = rel->hashed_tuple_tables[i]; - - if (table == NULL) - continue; - - key = tuple[i]; - per_key_table = g_hash_table_lookup (table, key); - - if (per_key_table == NULL) - { - per_key_table = g_hash_table_new (tuple_hash (rel->fields), tuple_equal (rel->fields)); - g_hash_table_insert (table, key, per_key_table); - } - - g_hash_table_insert (per_key_table, tuple, tuple); - } -} - -static void -g_relation_delete_tuple (gpointer tuple_key, - gpointer tuple_value, - gpointer user_data) -{ - gpointer *tuple = (gpointer*) tuple_value; - GRealRelation *rel = (GRealRelation *) user_data; - gint j; - - g_assert (tuple_key == tuple_value); - - for (j = 0; j < rel->fields; j += 1) - { - GHashTable *one_table = rel->hashed_tuple_tables[j]; - gpointer one_key; - GHashTable *per_key_table; - - if (one_table == NULL) - continue; - - if (j == rel->current_field) - /* can't delete from the table we're foreaching in */ - continue; - - one_key = tuple[j]; - - per_key_table = g_hash_table_lookup (one_table, one_key); - - g_hash_table_remove (per_key_table, tuple); - } - - g_hash_table_remove (rel->all_tuples, tuple); - - rel->count -= 1; -} - -gint -g_relation_delete (GRelation *relation, - gconstpointer key, - gint field) -{ - GRealRelation *rel = (GRealRelation *) relation; - GHashTable *table = rel->hashed_tuple_tables[field]; - GHashTable *key_table; - gint count = rel->count; - - g_return_val_if_fail (relation != NULL, 0); - g_return_val_if_fail (table != NULL, 0); - - key_table = g_hash_table_lookup (table, key); - - if (!key_table) - return 0; - - rel->current_field = field; - - g_hash_table_foreach (key_table, g_relation_delete_tuple, rel); - - g_hash_table_remove (table, key); - - g_hash_table_destroy (key_table); - - /* @@@ FIXME: Remove empty hash tables. */ - - return count - rel->count; -} - -static void -g_relation_select_tuple (gpointer tuple_key, - gpointer tuple_value, - gpointer user_data) -{ - gpointer *tuple = (gpointer*) tuple_value; - GRealTuples *tuples = (GRealTuples*) user_data; - gint stride = sizeof (gpointer) * tuples->width; - - g_assert (tuple_key == tuple_value); - - memcpy (tuples->data + (tuples->len * tuples->width), - tuple, - stride); - - tuples->len += 1; -} - -GTuples* -g_relation_select (GRelation *relation, - gconstpointer key, - gint field) -{ - GRealRelation *rel = (GRealRelation *) relation; - GHashTable *table = rel->hashed_tuple_tables[field]; - GHashTable *key_table; - GRealTuples *tuples = g_new0 (GRealTuples, 1); - gint count; - - g_return_val_if_fail (relation != NULL, NULL); - g_return_val_if_fail (table != NULL, NULL); - - key_table = g_hash_table_lookup (table, key); - - if (!key_table) - return (GTuples*)tuples; - - count = g_relation_count (relation, key, field); - - tuples->data = g_malloc (sizeof (gpointer) * rel->fields * count); - tuples->width = rel->fields; - - g_hash_table_foreach (key_table, g_relation_select_tuple, tuples); - - g_assert (count == tuples->len); - - return (GTuples*)tuples; -} - -gint -g_relation_count (GRelation *relation, - gconstpointer key, - gint field) -{ - GRealRelation *rel = (GRealRelation *) relation; - GHashTable *table = rel->hashed_tuple_tables[field]; - GHashTable *key_table; - - g_return_val_if_fail (relation != NULL, 0); - g_return_val_if_fail (table != NULL, 0); - - key_table = g_hash_table_lookup (table, key); - - if (!key_table) - return 0; - - return g_hash_table_size (key_table); -} - -gboolean -g_relation_exists (GRelation *relation, ...) -{ - GRealRelation *rel = (GRealRelation *) relation; - gpointer* tuple = g_chunk_new (gpointer, rel->tuple_chunk); - va_list args; - gint i; - gboolean result; - - va_start(args, relation); - - for (i = 0; i < rel->fields; i += 1) - tuple[i] = va_arg(args, gpointer); - - va_end(args); - - result = g_hash_table_lookup (rel->all_tuples, tuple) != NULL; - - g_mem_chunk_free (rel->tuple_chunk, tuple); - - return result; -} - -void -g_tuples_destroy (GTuples *tuples0) -{ - GRealTuples *tuples = (GRealTuples*) tuples0; - - if (tuples) - { - g_free (tuples->data); - g_free (tuples); - } -} - -gpointer -g_tuples_index (GTuples *tuples0, - gint index, - gint field) -{ - GRealTuples *tuples = (GRealTuples*) tuples0; - - g_return_val_if_fail (tuples0 != NULL, NULL); - g_return_val_if_fail (field < tuples->width, NULL); - - return tuples->data[index * tuples->width + field]; -} - -/* Print - */ - -static void -g_relation_print_one (gpointer tuple_key, - gpointer tuple_value, - gpointer user_data) -{ - gint i; - GString *gstring; - GRealRelation* rel = (GRealRelation*) user_data; - gpointer* tuples = (gpointer*) tuple_value; - - gstring = g_string_new ("["); - - for (i = 0; i < rel->fields; i += 1) - { - g_string_printfa (gstring, "%p", tuples[i]); - - if (i < (rel->fields - 1)) - g_string_append (gstring, ","); - } - - g_string_append (gstring, "]"); - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, gstring->str); - g_string_free (gstring, TRUE); -} - -static void -g_relation_print_index (gpointer tuple_key, - gpointer tuple_value, - gpointer user_data) -{ - GRealRelation* rel = (GRealRelation*) user_data; - GHashTable* table = (GHashTable*) tuple_value; - - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "*** key %p", tuple_key); - - g_hash_table_foreach (table, - g_relation_print_one, - rel); -} - -void -g_relation_print (GRelation *relation) -{ - gint i; - GRealRelation* rel = (GRealRelation*) relation; - - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "*** all tuples (%d)", rel->count); - - g_hash_table_foreach (rel->all_tuples, - g_relation_print_one, - rel); - - for (i = 0; i < rel->fields; i += 1) - { - if (rel->hashed_tuple_tables[i] == NULL) - continue; - - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "*** index %d", i); - - g_hash_table_foreach (rel->hashed_tuple_tables[i], - g_relation_print_index, - rel); - } - -} diff --git a/grel.h b/grel.h deleted file mode 100644 index fcf8eab45..000000000 --- a/grel.h +++ /dev/null @@ -1,94 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_REL_H__ -#define __G_REL_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef struct _GRelation GRelation; -typedef struct _GTuples GTuples; - -struct _GTuples -{ - guint len; -}; - -/* GRelation - * - * Indexed Relations. Imagine a really simple table in a - * database. Relations are not ordered. This data type is meant for - * maintaining a N-way mapping. - * - * g_relation_new() creates a relation with FIELDS fields - * - * g_relation_destroy() frees all resources - * g_tuples_destroy() frees the result of g_relation_select() - * - * g_relation_index() indexes relation FIELD with the provided - * equality and hash functions. this must be done before any - * calls to insert are made. - * - * g_relation_insert() inserts a new tuple. you are expected to - * provide the right number of fields. - * - * g_relation_delete() deletes all relations with KEY in FIELD - * g_relation_select() returns ... - * g_relation_count() counts ... - */ - -GRelation* g_relation_new (gint fields); -void g_relation_destroy (GRelation *relation); -void g_relation_index (GRelation *relation, - gint field, - GHashFunc hash_func, - GEqualFunc key_equal_func); -void g_relation_insert (GRelation *relation, - ...); -gint g_relation_delete (GRelation *relation, - gconstpointer key, - gint field); -GTuples* g_relation_select (GRelation *relation, - gconstpointer key, - gint field); -gint g_relation_count (GRelation *relation, - gconstpointer key, - gint field); -gboolean g_relation_exists (GRelation *relation, - ...); -void g_relation_print (GRelation *relation); - -void g_tuples_destroy (GTuples *tuples); -gpointer g_tuples_index (GTuples *tuples, - gint index, - gint field); - -G_END_DECLS - -#endif /* __G_REL_H__ */ - diff --git a/gscanner.c b/gscanner.c deleted file mode 100644 index e73034a7f..000000000 --- a/gscanner.c +++ /dev/null @@ -1,1728 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * GScanner: Flexible lexical scanner for general purpose. - * Copyright (C) 1997, 1998 Tim Janik - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#define __gscanner_c__ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <stdio.h> -#include "glib.h" -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <errno.h> -#include <sys/types.h> /* needed for sys/stat.h */ -#include <sys/stat.h> -#ifdef G_OS_WIN32 -#include <io.h> /* For _read() */ -#endif - -/* --- defines --- */ -#define to_lower(c) ( \ - (guchar) ( \ - ( (((guchar)(c))>='A' && ((guchar)(c))<='Z') * ('a'-'A') ) | \ - ( (((guchar)(c))>=192 && ((guchar)(c))<=214) * (224-192) ) | \ - ( (((guchar)(c))>=216 && ((guchar)(c))<=222) * (248-216) ) | \ - ((guchar)(c)) \ - ) \ -) -#define READ_BUFFER_SIZE (4000) - - -/* --- typedefs --- */ -typedef struct _GScannerKey GScannerKey; - -struct _GScannerKey -{ - guint scope_id; - gchar *symbol; - gpointer value; -}; - - - -/* --- variables --- */ -static GScannerConfig g_scanner_config_template = -{ - ( - " \t\r\n" - ) /* cset_skip_characters */, - ( - G_CSET_a_2_z - "_" - G_CSET_A_2_Z - ) /* cset_identifier_first */, - ( - G_CSET_a_2_z - "_" - G_CSET_A_2_Z - G_CSET_DIGITS - G_CSET_LATINS - G_CSET_LATINC - ) /* cset_identifier_nth */, - ( "#\n" ) /* cpair_comment_single */, - - FALSE /* case_sensitive */, - - TRUE /* skip_comment_multi */, - TRUE /* skip_comment_single */, - TRUE /* scan_comment_multi */, - TRUE /* scan_identifier */, - FALSE /* scan_identifier_1char */, - FALSE /* scan_identifier_NULL */, - TRUE /* scan_symbols */, - FALSE /* scan_binary */, - TRUE /* scan_octal */, - TRUE /* scan_float */, - TRUE /* scan_hex */, - FALSE /* scan_hex_dollar */, - TRUE /* scan_string_sq */, - TRUE /* scan_string_dq */, - TRUE /* numbers_2_int */, - FALSE /* int_2_float */, - FALSE /* identifier_2_string */, - TRUE /* char_2_token */, - FALSE /* symbol_2_token */, - FALSE /* scope_0_fallback */, -}; - - -/* --- prototypes --- */ -static inline -GScannerKey* g_scanner_lookup_internal (GScanner *scanner, - guint scope_id, - const gchar *symbol); -static gboolean g_scanner_key_equal (gconstpointer v1, - gconstpointer v2); -static guint g_scanner_key_hash (gconstpointer v); -static void g_scanner_get_token_ll (GScanner *scanner, - GTokenType *token_p, - GTokenValue *value_p, - guint *line_p, - guint *position_p); -static void g_scanner_get_token_i (GScanner *scanner, - GTokenType *token_p, - GTokenValue *value_p, - guint *line_p, - guint *position_p); - -static guchar g_scanner_peek_next_char (GScanner *scanner); -static guchar g_scanner_get_char (GScanner *scanner, - guint *line_p, - guint *position_p); -static void g_scanner_msg_handler (GScanner *scanner, - gchar *message, - gint is_error); - - -/* --- functions --- */ -static inline gint -g_scanner_char_2_num (guchar c, - guchar base) -{ - if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'Z') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'z') - c -= 'a' - 10; - else - return -1; - - if (c < base) - return c; - - return -1; -} - -GScanner* -g_scanner_new (const GScannerConfig *config_templ) -{ - GScanner *scanner; - - if (!config_templ) - config_templ = &g_scanner_config_template; - - scanner = g_new0 (GScanner, 1); - - scanner->user_data = NULL; - scanner->max_parse_errors = 0; - scanner->parse_errors = 0; - scanner->input_name = NULL; - g_datalist_init (&scanner->qdata); - - scanner->config = g_new0 (GScannerConfig, 1); - - scanner->config->case_sensitive = config_templ->case_sensitive; - scanner->config->cset_skip_characters = config_templ->cset_skip_characters; - if (!scanner->config->cset_skip_characters) - scanner->config->cset_skip_characters = ""; - scanner->config->cset_identifier_first = config_templ->cset_identifier_first; - scanner->config->cset_identifier_nth = config_templ->cset_identifier_nth; - scanner->config->cpair_comment_single = config_templ->cpair_comment_single; - scanner->config->skip_comment_multi = config_templ->skip_comment_multi; - scanner->config->skip_comment_single = config_templ->skip_comment_single; - scanner->config->scan_comment_multi = config_templ->scan_comment_multi; - scanner->config->scan_identifier = config_templ->scan_identifier; - scanner->config->scan_identifier_1char = config_templ->scan_identifier_1char; - scanner->config->scan_identifier_NULL = config_templ->scan_identifier_NULL; - scanner->config->scan_symbols = config_templ->scan_symbols; - scanner->config->scan_binary = config_templ->scan_binary; - scanner->config->scan_octal = config_templ->scan_octal; - scanner->config->scan_float = config_templ->scan_float; - scanner->config->scan_hex = config_templ->scan_hex; - scanner->config->scan_hex_dollar = config_templ->scan_hex_dollar; - scanner->config->scan_string_sq = config_templ->scan_string_sq; - scanner->config->scan_string_dq = config_templ->scan_string_dq; - scanner->config->numbers_2_int = config_templ->numbers_2_int; - scanner->config->int_2_float = config_templ->int_2_float; - scanner->config->identifier_2_string = config_templ->identifier_2_string; - scanner->config->char_2_token = config_templ->char_2_token; - scanner->config->symbol_2_token = config_templ->symbol_2_token; - scanner->config->scope_0_fallback = config_templ->scope_0_fallback; - - scanner->token = G_TOKEN_NONE; - scanner->value.v_int = 0; - scanner->line = 1; - scanner->position = 0; - - scanner->next_token = G_TOKEN_NONE; - scanner->next_value.v_int = 0; - scanner->next_line = 1; - scanner->next_position = 0; - - scanner->symbol_table = g_hash_table_new (g_scanner_key_hash, g_scanner_key_equal); - scanner->input_fd = -1; - scanner->text = NULL; - scanner->text_end = NULL; - scanner->buffer = NULL; - scanner->scope_id = 0; - - scanner->msg_handler = g_scanner_msg_handler; - - return scanner; -} - -static inline void -g_scanner_free_value (GTokenType *token_p, - GTokenValue *value_p) -{ - switch (*token_p) - { - case G_TOKEN_STRING: - case G_TOKEN_IDENTIFIER: - case G_TOKEN_IDENTIFIER_NULL: - case G_TOKEN_COMMENT_SINGLE: - case G_TOKEN_COMMENT_MULTI: - g_free (value_p->v_string); - break; - - default: - break; - } - - *token_p = G_TOKEN_NONE; -} - -static void -g_scanner_destroy_symbol_table_entry (gpointer _key, - gpointer _value, - gpointer _data) -{ - GScannerKey *key = _key; - - g_free (key->symbol); - g_free (key); -} - -void -g_scanner_destroy (GScanner *scanner) -{ - g_return_if_fail (scanner != NULL); - - g_datalist_clear (&scanner->qdata); - g_hash_table_foreach (scanner->symbol_table, - g_scanner_destroy_symbol_table_entry, NULL); - g_hash_table_destroy (scanner->symbol_table); - g_scanner_free_value (&scanner->token, &scanner->value); - g_scanner_free_value (&scanner->next_token, &scanner->next_value); - g_free (scanner->config); - g_free (scanner->buffer); - g_free (scanner); -} - -static void -g_scanner_msg_handler (GScanner *scanner, - gchar *message, - gint is_error) -{ - g_return_if_fail (scanner != NULL); - - fprintf (stdout, "%s:%d: ", scanner->input_name, scanner->line); - if (is_error) - fprintf (stdout, "error: "); - fprintf (stdout, "%s\n", message); -} - -void -g_scanner_error (GScanner *scanner, - const gchar *format, - ...) -{ - g_return_if_fail (scanner != NULL); - g_return_if_fail (format != NULL); - - scanner->parse_errors++; - - if (scanner->msg_handler) - { - va_list args; - gchar *string; - - va_start (args, format); - string = g_strdup_vprintf (format, args); - va_end (args); - - scanner->msg_handler (scanner, string, TRUE); - - g_free (string); - } -} - -void -g_scanner_warn (GScanner *scanner, - const gchar *format, - ...) -{ - g_return_if_fail (scanner != NULL); - g_return_if_fail (format != NULL); - - if (scanner->msg_handler) - { - va_list args; - gchar *string; - - va_start (args, format); - string = g_strdup_vprintf (format, args); - va_end (args); - - scanner->msg_handler (scanner, string, FALSE); - - g_free (string); - } -} - -static gboolean -g_scanner_key_equal (gconstpointer v1, - gconstpointer v2) -{ - const GScannerKey *key1 = v1; - const GScannerKey *key2 = v2; - - return (key1->scope_id == key2->scope_id) && (strcmp (key1->symbol, key2->symbol) == 0); -} - -static guint -g_scanner_key_hash (gconstpointer v) -{ - const GScannerKey *key = v; - gchar *c; - guint h; - - h = key->scope_id; - for (c = key->symbol; *c; c++) - h = (h << 5) - h + *c; - - return h; -} - -static inline GScannerKey* -g_scanner_lookup_internal (GScanner *scanner, - guint scope_id, - const gchar *symbol) -{ - GScannerKey *key_p; - GScannerKey key; - - key.scope_id = scope_id; - - if (!scanner->config->case_sensitive) - { - gchar *d; - const gchar *c; - - key.symbol = g_new (gchar, strlen (symbol) + 1); - for (d = key.symbol, c = symbol; *c; c++, d++) - *d = to_lower (*c); - *d = 0; - key_p = g_hash_table_lookup (scanner->symbol_table, &key); - g_free (key.symbol); - } - else - { - key.symbol = (gchar*) symbol; - key_p = g_hash_table_lookup (scanner->symbol_table, &key); - } - - return key_p; -} - -void -g_scanner_scope_add_symbol (GScanner *scanner, - guint scope_id, - const gchar *symbol, - gpointer value) -{ - GScannerKey *key; - - g_return_if_fail (scanner != NULL); - g_return_if_fail (symbol != NULL); - - key = g_scanner_lookup_internal (scanner, scope_id, symbol); - - if (!key) - { - key = g_new (GScannerKey, 1); - key->scope_id = scope_id; - key->symbol = g_strdup (symbol); - key->value = value; - if (!scanner->config->case_sensitive) - { - gchar *c; - - c = key->symbol; - while (*c != 0) - { - *c = to_lower (*c); - c++; - } - } - g_hash_table_insert (scanner->symbol_table, key, key); - } - else - key->value = value; -} - -void -g_scanner_scope_remove_symbol (GScanner *scanner, - guint scope_id, - const gchar *symbol) -{ - GScannerKey *key; - - g_return_if_fail (scanner != NULL); - g_return_if_fail (symbol != NULL); - - key = g_scanner_lookup_internal (scanner, scope_id, symbol); - - if (key) - { - g_hash_table_remove (scanner->symbol_table, key); - g_free (key->symbol); - g_free (key); - } -} - -gpointer -g_scanner_lookup_symbol (GScanner *scanner, - const gchar *symbol) -{ - GScannerKey *key; - guint scope_id; - - g_return_val_if_fail (scanner != NULL, NULL); - - if (!symbol) - return NULL; - - scope_id = scanner->scope_id; - key = g_scanner_lookup_internal (scanner, scope_id, symbol); - if (!key && scope_id && scanner->config->scope_0_fallback) - key = g_scanner_lookup_internal (scanner, 0, symbol); - - if (key) - return key->value; - else - return NULL; -} - -gpointer -g_scanner_scope_lookup_symbol (GScanner *scanner, - guint scope_id, - const gchar *symbol) -{ - GScannerKey *key; - - g_return_val_if_fail (scanner != NULL, NULL); - - if (!symbol) - return NULL; - - key = g_scanner_lookup_internal (scanner, scope_id, symbol); - - if (key) - return key->value; - else - return NULL; -} - -guint -g_scanner_set_scope (GScanner *scanner, - guint scope_id) -{ - guint old_scope_id; - - g_return_val_if_fail (scanner != NULL, 0); - - old_scope_id = scanner->scope_id; - scanner->scope_id = scope_id; - - return old_scope_id; -} - -static void -g_scanner_foreach_internal (gpointer _key, - gpointer _value, - gpointer _user_data) -{ - GScannerKey *key; - gpointer *d; - GHFunc func; - gpointer user_data; - guint *scope_id; - - d = _user_data; - func = (GHFunc) d[0]; - user_data = d[1]; - scope_id = d[2]; - key = _value; - - if (key->scope_id == *scope_id) - func (key->symbol, key->value, user_data); -} - -void -g_scanner_scope_foreach_symbol (GScanner *scanner, - guint scope_id, - GHFunc func, - gpointer user_data) -{ - gpointer d[3]; - - g_return_if_fail (scanner != NULL); - - d[0] = (gpointer) func; - d[1] = user_data; - d[2] = &scope_id; - - g_hash_table_foreach (scanner->symbol_table, g_scanner_foreach_internal, d); -} - -GTokenType -g_scanner_peek_next_token (GScanner *scanner) -{ - g_return_val_if_fail (scanner != NULL, G_TOKEN_EOF); - - if (scanner->next_token == G_TOKEN_NONE) - { - scanner->next_line = scanner->line; - scanner->next_position = scanner->position; - g_scanner_get_token_i (scanner, - &scanner->next_token, - &scanner->next_value, - &scanner->next_line, - &scanner->next_position); - } - - return scanner->next_token; -} - -GTokenType -g_scanner_get_next_token (GScanner *scanner) -{ - g_return_val_if_fail (scanner != NULL, G_TOKEN_EOF); - - if (scanner->next_token != G_TOKEN_NONE) - { - g_scanner_free_value (&scanner->token, &scanner->value); - - scanner->token = scanner->next_token; - scanner->value = scanner->next_value; - scanner->line = scanner->next_line; - scanner->position = scanner->next_position; - scanner->next_token = G_TOKEN_NONE; - } - else - g_scanner_get_token_i (scanner, - &scanner->token, - &scanner->value, - &scanner->line, - &scanner->position); - - return scanner->token; -} - -GTokenType -g_scanner_cur_token (GScanner *scanner) -{ - g_return_val_if_fail (scanner != NULL, G_TOKEN_EOF); - - return scanner->token; -} - -GTokenValue -g_scanner_cur_value (GScanner *scanner) -{ - GTokenValue v; - - v.v_int = 0; - - g_return_val_if_fail (scanner != NULL, v); - - /* MSC isn't capable of handling return scanner->value; ? */ - - v = scanner->value; - - return v; -} - -guint -g_scanner_cur_line (GScanner *scanner) -{ - g_return_val_if_fail (scanner != NULL, 0); - - return scanner->line; -} - -guint -g_scanner_cur_position (GScanner *scanner) -{ - g_return_val_if_fail (scanner != NULL, 0); - - return scanner->position; -} - -gboolean -g_scanner_eof (GScanner *scanner) -{ - g_return_val_if_fail (scanner != NULL, TRUE); - - return scanner->token == G_TOKEN_EOF; -} - -void -g_scanner_input_file (GScanner *scanner, - gint input_fd) -{ - g_return_if_fail (scanner != NULL); - g_return_if_fail (input_fd >= 0); - - if (scanner->input_fd >= 0) - g_scanner_sync_file_offset (scanner); - - scanner->token = G_TOKEN_NONE; - scanner->value.v_int = 0; - scanner->line = 1; - scanner->position = 0; - scanner->next_token = G_TOKEN_NONE; - - scanner->input_fd = input_fd; - scanner->text = NULL; - scanner->text_end = NULL; - - if (!scanner->buffer) - scanner->buffer = g_new (gchar, READ_BUFFER_SIZE + 1); -} - -void -g_scanner_input_text (GScanner *scanner, - const gchar *text, - guint text_len) -{ - g_return_if_fail (scanner != NULL); - if (text_len) - g_return_if_fail (text != NULL); - else - text = NULL; - - if (scanner->input_fd >= 0) - g_scanner_sync_file_offset (scanner); - - scanner->token = G_TOKEN_NONE; - scanner->value.v_int = 0; - scanner->line = 1; - scanner->position = 0; - scanner->next_token = G_TOKEN_NONE; - - scanner->input_fd = -1; - scanner->text = text; - scanner->text_end = text + text_len; - - if (scanner->buffer) - { - g_free (scanner->buffer); - scanner->buffer = NULL; - } -} - -static guchar -g_scanner_peek_next_char (GScanner *scanner) -{ - if (scanner->text < scanner->text_end) - { - return *scanner->text; - } - else if (scanner->input_fd >= 0) - { - gint count; - gchar *buffer; - - buffer = scanner->buffer; - do - { - count = read (scanner->input_fd, buffer, READ_BUFFER_SIZE); - } - while (count == -1 && (errno == EINTR || errno == EAGAIN)); - - if (count < 1) - { - scanner->input_fd = -1; - - return 0; - } - else - { - scanner->text = buffer; - scanner->text_end = buffer + count; - - return *buffer; - } - } - else - return 0; -} - -void -g_scanner_sync_file_offset (GScanner *scanner) -{ - g_return_if_fail (scanner != NULL); - - /* for file input, rewind the filedescriptor to the current - * buffer position and blow the file read ahead buffer. usefull for - * third party uses of our filedescriptor, which hooks onto the current - * scanning position. - */ - - if (scanner->input_fd >= 0 && scanner->text_end > scanner->text) - { - gint buffered; - - buffered = scanner->text_end - scanner->text; - if (lseek (scanner->input_fd, - buffered, SEEK_CUR) >= 0) - { - /* we succeeded, blow our buffer's contents now */ - scanner->text = NULL; - scanner->text_end = NULL; - } - else - errno = 0; - } -} - -static guchar -g_scanner_get_char (GScanner *scanner, - guint *line_p, - guint *position_p) -{ - guchar fchar; - - if (scanner->text < scanner->text_end) - fchar = *(scanner->text++); - else if (scanner->input_fd >= 0) - { - gint count; - gchar *buffer; - - buffer = scanner->buffer; - do - { - count = read (scanner->input_fd, buffer, READ_BUFFER_SIZE); - } - while (count == -1 && (errno == EINTR || errno == EAGAIN)); - - if (count < 1) - { - scanner->input_fd = -1; - fchar = 0; - } - else - { - scanner->text = buffer + 1; - scanner->text_end = buffer + count; - fchar = *buffer; - if (!fchar) - { - g_scanner_sync_file_offset (scanner); - scanner->text_end = scanner->text; - scanner->input_fd = -1; - } - } - } - else - fchar = 0; - - if (fchar == '\n') - { - (*position_p) = 0; - (*line_p)++; - } - else if (fchar) - { - (*position_p)++; - } - - return fchar; -} - -void -g_scanner_unexp_token (GScanner *scanner, - GTokenType expected_token, - const gchar *identifier_spec, - const gchar *symbol_spec, - const gchar *symbol_name, - const gchar *message, - gint is_error) -{ - gchar *token_string; - guint token_string_len; - gchar *expected_string; - guint expected_string_len; - gchar *message_prefix; - gboolean print_unexp; - void (*msg_handler) (GScanner*, const gchar*, ...); - - g_return_if_fail (scanner != NULL); - - if (is_error) - msg_handler = g_scanner_error; - else - msg_handler = g_scanner_warn; - - if (!identifier_spec) - identifier_spec = "identifier"; - if (!symbol_spec) - symbol_spec = "symbol"; - - token_string_len = 56; - token_string = g_new (gchar, token_string_len + 1); - expected_string_len = 64; - expected_string = g_new (gchar, expected_string_len + 1); - print_unexp = TRUE; - - switch (scanner->token) - { - case G_TOKEN_EOF: - g_snprintf (token_string, token_string_len, "end of file"); - break; - - default: - if (scanner->token >= 1 && scanner->token <= 255) - { - if ((scanner->token >= ' ' && scanner->token <= '~') || - strchr (scanner->config->cset_identifier_first, scanner->token) || - strchr (scanner->config->cset_identifier_nth, scanner->token)) - g_snprintf (token_string, expected_string_len, "character `%c'", scanner->token); - else - g_snprintf (token_string, expected_string_len, "character `\\%o'", scanner->token); - break; - } - else if (!scanner->config->symbol_2_token) - { - g_snprintf (token_string, token_string_len, "(unknown) token <%d>", scanner->token); - break; - } - /* fall through */ - case G_TOKEN_SYMBOL: - if (expected_token == G_TOKEN_SYMBOL || - (scanner->config->symbol_2_token && - expected_token > G_TOKEN_LAST)) - print_unexp = FALSE; - if (symbol_name) - g_snprintf (token_string, - token_string_len, - "%s%s `%s'", - print_unexp ? "" : "invalid ", - symbol_spec, - symbol_name); - else - g_snprintf (token_string, - token_string_len, - "%s%s", - print_unexp ? "" : "invalid ", - symbol_spec); - break; - - case G_TOKEN_ERROR: - print_unexp = FALSE; - expected_token = G_TOKEN_NONE; - switch (scanner->value.v_error) - { - case G_ERR_UNEXP_EOF: - g_snprintf (token_string, token_string_len, "scanner: unexpected end of file"); - break; - - case G_ERR_UNEXP_EOF_IN_STRING: - g_snprintf (token_string, token_string_len, "scanner: unterminated string constant"); - break; - - case G_ERR_UNEXP_EOF_IN_COMMENT: - g_snprintf (token_string, token_string_len, "scanner: unterminated comment"); - break; - - case G_ERR_NON_DIGIT_IN_CONST: - g_snprintf (token_string, token_string_len, "scanner: non digit in constant"); - break; - - case G_ERR_FLOAT_RADIX: - g_snprintf (token_string, token_string_len, "scanner: invalid radix for floating constant"); - break; - - case G_ERR_FLOAT_MALFORMED: - g_snprintf (token_string, token_string_len, "scanner: malformed floating constant"); - break; - - case G_ERR_DIGIT_RADIX: - g_snprintf (token_string, token_string_len, "scanner: digit is beyond radix"); - break; - - case G_ERR_UNKNOWN: - default: - g_snprintf (token_string, token_string_len, "scanner: unknown error"); - break; - } - break; - - case G_TOKEN_CHAR: - g_snprintf (token_string, token_string_len, "character `%c'", scanner->value.v_char); - break; - - case G_TOKEN_IDENTIFIER: - case G_TOKEN_IDENTIFIER_NULL: - if (expected_token == G_TOKEN_IDENTIFIER || - expected_token == G_TOKEN_IDENTIFIER_NULL) - print_unexp = FALSE; - g_snprintf (token_string, - token_string_len, - "%s%s `%s'", - print_unexp ? "" : "invalid ", - identifier_spec, - scanner->token == G_TOKEN_IDENTIFIER ? scanner->value.v_string : "null"); - break; - - case G_TOKEN_BINARY: - case G_TOKEN_OCTAL: - case G_TOKEN_INT: - case G_TOKEN_HEX: - g_snprintf (token_string, token_string_len, "number `%ld'", scanner->value.v_int); - break; - - case G_TOKEN_FLOAT: - g_snprintf (token_string, token_string_len, "number `%.3f'", scanner->value.v_float); - break; - - case G_TOKEN_STRING: - if (expected_token == G_TOKEN_STRING) - print_unexp = FALSE; - g_snprintf (token_string, - token_string_len, - "%s%sstring constant \"%s\"", - print_unexp ? "" : "invalid ", - scanner->value.v_string[0] == 0 ? "empty " : "", - scanner->value.v_string); - token_string[token_string_len - 2] = '"'; - token_string[token_string_len - 1] = 0; - break; - - case G_TOKEN_COMMENT_SINGLE: - case G_TOKEN_COMMENT_MULTI: - g_snprintf (token_string, token_string_len, "comment"); - break; - - case G_TOKEN_NONE: - /* somehow the user's parsing code is screwed, there isn't much - * we can do about it. - * Note, a common case to trigger this is - * g_scanner_peek_next_token(); g_scanner_unexp_token(); - * without an intermediate g_scanner_get_next_token(). - */ - g_assert_not_reached (); - break; - } - - - switch (expected_token) - { - gboolean need_valid; - - default: - if (expected_token >= 1 && expected_token <= 255) - { - if ((expected_token >= ' ' && expected_token <= '~') || - strchr (scanner->config->cset_identifier_first, expected_token) || - strchr (scanner->config->cset_identifier_nth, expected_token)) - g_snprintf (expected_string, expected_string_len, "character `%c'", expected_token); - else - g_snprintf (expected_string, expected_string_len, "character `\\%o'", expected_token); - break; - } - else if (!scanner->config->symbol_2_token) - { - g_snprintf (expected_string, expected_string_len, "(unknown) token <%d>", expected_token); - break; - } - /* fall through */ - case G_TOKEN_SYMBOL: - need_valid = (scanner->token == G_TOKEN_SYMBOL || - (scanner->config->symbol_2_token && - scanner->token > G_TOKEN_LAST)); - g_snprintf (expected_string, - expected_string_len, - "%s%s", - need_valid ? "valid " : "", - symbol_spec); - /* FIXME: should we attempt to lookup the symbol_name for symbol_2_token? */ - break; - - case G_TOKEN_INT: - g_snprintf (expected_string, expected_string_len, "number (integer)"); - break; - - case G_TOKEN_FLOAT: - g_snprintf (expected_string, expected_string_len, "number (float)"); - break; - - case G_TOKEN_STRING: - g_snprintf (expected_string, - expected_string_len, - "%sstring constant", - scanner->token == G_TOKEN_STRING ? "valid " : ""); - break; - - case G_TOKEN_IDENTIFIER: - case G_TOKEN_IDENTIFIER_NULL: - g_snprintf (expected_string, - expected_string_len, - "%s%s", - (scanner->token == G_TOKEN_IDENTIFIER_NULL || - scanner->token == G_TOKEN_IDENTIFIER ? "valid " : ""), - identifier_spec); - break; - - case G_TOKEN_EOF: - g_snprintf (expected_string, expected_string_len, "end of file"); - break; - - case G_TOKEN_NONE: - break; - } - - if (message && message[0] != 0) - message_prefix = " - "; - else - { - message_prefix = ""; - message = ""; - } - - if (expected_token != G_TOKEN_NONE) - { - if (print_unexp) - msg_handler (scanner, - "unexpected %s, expected %s%s%s", - token_string, - expected_string, - message_prefix, - message); - else - msg_handler (scanner, - "%s, expected %s%s%s", - token_string, - expected_string, - message_prefix, - message); - } - else - { - if (print_unexp) - msg_handler (scanner, - "unexpected %s%s%s", - token_string, - message_prefix, - message); - else - msg_handler (scanner, - "%s%s%s", - token_string, - message_prefix, - message); - } - - g_free (token_string); - g_free (expected_string); -} - -gint -g_scanner_stat_mode (const gchar *filename) -{ - struct stat *stat_buf; - gint st_mode; - - stat_buf = g_new0 (struct stat, 1); -#ifdef HAVE_LSTAT - lstat (filename, stat_buf); -#else - stat (filename, stat_buf); -#endif - st_mode = stat_buf->st_mode; - - g_free (stat_buf); - - return st_mode; -} - -static void -g_scanner_get_token_i (GScanner *scanner, - GTokenType *token_p, - GTokenValue *value_p, - guint *line_p, - guint *position_p) -{ - do - { - g_scanner_free_value (token_p, value_p); - g_scanner_get_token_ll (scanner, token_p, value_p, line_p, position_p); - } - while (((*token_p > 0 && *token_p < 256) && - strchr (scanner->config->cset_skip_characters, *token_p)) || - (*token_p == G_TOKEN_CHAR && - strchr (scanner->config->cset_skip_characters, value_p->v_char)) || - (*token_p == G_TOKEN_COMMENT_MULTI && - scanner->config->skip_comment_multi) || - (*token_p == G_TOKEN_COMMENT_SINGLE && - scanner->config->skip_comment_single)); - - switch (*token_p) - { - case G_TOKEN_IDENTIFIER: - if (scanner->config->identifier_2_string) - *token_p = G_TOKEN_STRING; - break; - - case G_TOKEN_SYMBOL: - if (scanner->config->symbol_2_token) - *token_p = (GTokenType) value_p->v_symbol; - break; - - case G_TOKEN_BINARY: - case G_TOKEN_OCTAL: - case G_TOKEN_HEX: - if (scanner->config->numbers_2_int) - *token_p = G_TOKEN_INT; - break; - - default: - break; - } - - if (*token_p == G_TOKEN_INT && - scanner->config->int_2_float) - { - *token_p = G_TOKEN_FLOAT; - value_p->v_float = value_p->v_int; - } - - errno = 0; -} - -static void -g_scanner_get_token_ll (GScanner *scanner, - GTokenType *token_p, - GTokenValue *value_p, - guint *line_p, - guint *position_p) -{ - GScannerConfig *config; - GTokenType token; - gboolean in_comment_multi; - gboolean in_comment_single; - gboolean in_string_sq; - gboolean in_string_dq; - GString *gstring; - GTokenValue value; - guchar ch; - - config = scanner->config; - (*value_p).v_int = 0; - - if ((scanner->text >= scanner->text_end && scanner->input_fd < 0) || - scanner->token == G_TOKEN_EOF) - { - *token_p = G_TOKEN_EOF; - return; - } - - in_comment_multi = FALSE; - in_comment_single = FALSE; - in_string_sq = FALSE; - in_string_dq = FALSE; - gstring = NULL; - - do /* while (ch != 0) */ - { - gboolean dotted_float = FALSE; - - ch = g_scanner_get_char (scanner, line_p, position_p); - - value.v_int = 0; - token = G_TOKEN_NONE; - - /* this is *evil*, but needed ;( - * we first check for identifier first character, because it - * might interfere with other key chars like slashes or numbers - */ - if (config->scan_identifier && - ch && strchr (config->cset_identifier_first, ch)) - goto identifier_precedence; - - switch (ch) - { - case 0: - token = G_TOKEN_EOF; - (*position_p)++; - /* ch = 0; */ - break; - - case '/': - if (!config->scan_comment_multi || - g_scanner_peek_next_char (scanner) != '*') - goto default_case; - g_scanner_get_char (scanner, line_p, position_p); - token = G_TOKEN_COMMENT_MULTI; - in_comment_multi = TRUE; - gstring = g_string_new (""); - while ((ch = g_scanner_get_char (scanner, line_p, position_p)) != 0) - { - if (ch == '*' && g_scanner_peek_next_char (scanner) == '/') - { - g_scanner_get_char (scanner, line_p, position_p); - in_comment_multi = FALSE; - break; - } - else - gstring = g_string_append_c (gstring, ch); - } - ch = 0; - break; - - case '\'': - if (!config->scan_string_sq) - goto default_case; - token = G_TOKEN_STRING; - in_string_sq = TRUE; - gstring = g_string_new (""); - while ((ch = g_scanner_get_char (scanner, line_p, position_p)) != 0) - { - if (ch == '\'') - { - in_string_sq = FALSE; - break; - } - else - gstring = g_string_append_c (gstring, ch); - } - ch = 0; - break; - - case '"': - if (!config->scan_string_dq) - goto default_case; - token = G_TOKEN_STRING; - in_string_dq = TRUE; - gstring = g_string_new (""); - while ((ch = g_scanner_get_char (scanner, line_p, position_p)) != 0) - { - if (ch == '"') - { - in_string_dq = FALSE; - break; - } - else - { - if (ch == '\\') - { - ch = g_scanner_get_char (scanner, line_p, position_p); - switch (ch) - { - guint i; - guint fchar; - - case 0: - break; - - case '\\': - gstring = g_string_append_c (gstring, '\\'); - break; - - case 'n': - gstring = g_string_append_c (gstring, '\n'); - break; - - case 't': - gstring = g_string_append_c (gstring, '\t'); - break; - - case 'r': - gstring = g_string_append_c (gstring, '\r'); - break; - - case 'b': - gstring = g_string_append_c (gstring, '\b'); - break; - - case 'f': - gstring = g_string_append_c (gstring, '\f'); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - i = ch - '0'; - fchar = g_scanner_peek_next_char (scanner); - if (fchar >= '0' && fchar <= '7') - { - ch = g_scanner_get_char (scanner, line_p, position_p); - i = i * 8 + ch - '0'; - fchar = g_scanner_peek_next_char (scanner); - if (fchar >= '0' && fchar <= '7') - { - ch = g_scanner_get_char (scanner, line_p, position_p); - i = i * 8 + ch - '0'; - } - } - gstring = g_string_append_c (gstring, i); - break; - - default: - gstring = g_string_append_c (gstring, ch); - break; - } - } - else - gstring = g_string_append_c (gstring, ch); - } - } - ch = 0; - break; - - case '.': - if (!config->scan_float) - goto default_case; - token = G_TOKEN_FLOAT; - dotted_float = TRUE; - ch = g_scanner_get_char (scanner, line_p, position_p); - goto number_parsing; - - case '$': - if (!config->scan_hex_dollar) - goto default_case; - token = G_TOKEN_HEX; - ch = g_scanner_get_char (scanner, line_p, position_p); - goto number_parsing; - - case '0': - if (config->scan_octal) - token = G_TOKEN_OCTAL; - else - token = G_TOKEN_INT; - ch = g_scanner_peek_next_char (scanner); - if (config->scan_hex && (ch == 'x' || ch == 'X')) - { - token = G_TOKEN_HEX; - g_scanner_get_char (scanner, line_p, position_p); - ch = g_scanner_get_char (scanner, line_p, position_p); - if (ch == 0) - { - token = G_TOKEN_ERROR; - value.v_error = G_ERR_UNEXP_EOF; - (*position_p)++; - break; - } - if (g_scanner_char_2_num (ch, 16) < 0) - { - token = G_TOKEN_ERROR; - value.v_error = G_ERR_DIGIT_RADIX; - ch = 0; - break; - } - } - else if (config->scan_binary && (ch == 'b' || ch == 'B')) - { - token = G_TOKEN_BINARY; - g_scanner_get_char (scanner, line_p, position_p); - ch = g_scanner_get_char (scanner, line_p, position_p); - if (ch == 0) - { - token = G_TOKEN_ERROR; - value.v_error = G_ERR_UNEXP_EOF; - (*position_p)++; - break; - } - if (g_scanner_char_2_num (ch, 10) < 0) - { - token = G_TOKEN_ERROR; - value.v_error = G_ERR_NON_DIGIT_IN_CONST; - ch = 0; - break; - } - } - else - ch = '0'; - /* fall through */ - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - number_parsing: - { - gboolean in_number = TRUE; - gchar *endptr; - - if (token == G_TOKEN_NONE) - token = G_TOKEN_INT; - - gstring = g_string_new (dotted_float ? "0." : ""); - gstring = g_string_append_c (gstring, ch); - - do /* while (in_number) */ - { - gboolean is_E; - - is_E = token == G_TOKEN_FLOAT && (ch == 'e' || ch == 'E'); - - ch = g_scanner_peek_next_char (scanner); - - if (g_scanner_char_2_num (ch, 36) >= 0 || - (config->scan_float && ch == '.') || - (is_E && (ch == '+' || ch == '-'))) - { - ch = g_scanner_get_char (scanner, line_p, position_p); - - switch (ch) - { - case '.': - if (token != G_TOKEN_INT && token != G_TOKEN_OCTAL) - { - value.v_error = token == G_TOKEN_FLOAT ? G_ERR_FLOAT_MALFORMED : G_ERR_FLOAT_RADIX; - token = G_TOKEN_ERROR; - in_number = FALSE; - } - else - { - token = G_TOKEN_FLOAT; - gstring = g_string_append_c (gstring, ch); - } - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - gstring = g_string_append_c (gstring, ch); - break; - - case '-': - case '+': - if (token != G_TOKEN_FLOAT) - { - token = G_TOKEN_ERROR; - value.v_error = G_ERR_NON_DIGIT_IN_CONST; - in_number = FALSE; - } - else - gstring = g_string_append_c (gstring, ch); - break; - - case 'e': - case 'E': - if ((token != G_TOKEN_HEX && !config->scan_float) || - (token != G_TOKEN_HEX && - token != G_TOKEN_OCTAL && - token != G_TOKEN_FLOAT && - token != G_TOKEN_INT)) - { - token = G_TOKEN_ERROR; - value.v_error = G_ERR_NON_DIGIT_IN_CONST; - in_number = FALSE; - } - else - { - if (token != G_TOKEN_HEX) - token = G_TOKEN_FLOAT; - gstring = g_string_append_c (gstring, ch); - } - break; - - default: - if (token != G_TOKEN_HEX) - { - token = G_TOKEN_ERROR; - value.v_error = G_ERR_NON_DIGIT_IN_CONST; - in_number = FALSE; - } - else - gstring = g_string_append_c (gstring, ch); - break; - } - } - else - in_number = FALSE; - } - while (in_number); - - endptr = NULL; - switch (token) - { - case G_TOKEN_BINARY: - value.v_binary = strtol (gstring->str, &endptr, 2); - break; - - case G_TOKEN_OCTAL: - value.v_octal = strtol (gstring->str, &endptr, 8); - break; - - case G_TOKEN_INT: - value.v_int = strtol (gstring->str, &endptr, 10); - break; - - case G_TOKEN_FLOAT: - value.v_float = g_strtod (gstring->str, &endptr); - break; - - case G_TOKEN_HEX: - value.v_hex = strtol (gstring->str, &endptr, 16); - break; - - default: - break; - } - if (endptr && *endptr) - { - token = G_TOKEN_ERROR; - if (*endptr == 'e' || *endptr == 'E') - value.v_error = G_ERR_NON_DIGIT_IN_CONST; - else - value.v_error = G_ERR_DIGIT_RADIX; - } - g_string_free (gstring, TRUE); - gstring = NULL; - ch = 0; - } /* number_parsing:... */ - break; - - default: - default_case: - { - if (config->cpair_comment_single && - ch == config->cpair_comment_single[0]) - { - token = G_TOKEN_COMMENT_SINGLE; - in_comment_single = TRUE; - gstring = g_string_new (""); - ch = g_scanner_get_char (scanner, line_p, position_p); - while (ch != 0) - { - if (ch == config->cpair_comment_single[1]) - { - in_comment_single = FALSE; - ch = 0; - break; - } - - gstring = g_string_append_c (gstring, ch); - ch = g_scanner_get_char (scanner, line_p, position_p); - } - } - else if (config->scan_identifier && ch && - strchr (config->cset_identifier_first, ch)) - { - identifier_precedence: - - if (config->cset_identifier_nth && ch && - strchr (config->cset_identifier_nth, - g_scanner_peek_next_char (scanner))) - { - token = G_TOKEN_IDENTIFIER; - gstring = g_string_new (""); - gstring = g_string_append_c (gstring, ch); - do - { - ch = g_scanner_get_char (scanner, line_p, position_p); - gstring = g_string_append_c (gstring, ch); - ch = g_scanner_peek_next_char (scanner); - } - while (ch && strchr (config->cset_identifier_nth, ch)); - ch = 0; - } - else if (config->scan_identifier_1char) - { - token = G_TOKEN_IDENTIFIER; - value.v_identifier = g_new0 (gchar, 2); - value.v_identifier[0] = ch; - ch = 0; - } - } - if (ch) - { - if (config->char_2_token) - token = ch; - else - { - token = G_TOKEN_CHAR; - value.v_char = ch; - } - ch = 0; - } - } /* default_case:... */ - break; - } - g_assert (ch == 0 && token != G_TOKEN_NONE); /* paranoid */ - } - while (ch != 0); - - if (in_comment_multi || in_comment_single || - in_string_sq || in_string_dq) - { - token = G_TOKEN_ERROR; - if (gstring) - { - g_string_free (gstring, TRUE); - gstring = NULL; - } - (*position_p)++; - if (in_comment_multi || in_comment_single) - value.v_error = G_ERR_UNEXP_EOF_IN_COMMENT; - else /* (in_string_sq || in_string_dq) */ - value.v_error = G_ERR_UNEXP_EOF_IN_STRING; - } - - if (gstring) - { - value.v_string = gstring->str; - g_string_free (gstring, FALSE); - gstring = NULL; - } - - if (token == G_TOKEN_IDENTIFIER) - { - if (config->scan_symbols) - { - GScannerKey *key; - guint scope_id; - - scope_id = scanner->scope_id; - key = g_scanner_lookup_internal (scanner, scope_id, value.v_identifier); - if (!key && scope_id && scanner->config->scope_0_fallback) - key = g_scanner_lookup_internal (scanner, 0, value.v_identifier); - - if (key) - { - g_free (value.v_identifier); - token = G_TOKEN_SYMBOL; - value.v_symbol = key->value; - } - } - - if (token == G_TOKEN_IDENTIFIER && - config->scan_identifier_NULL && - strlen (value.v_identifier) == 4) - { - gchar *null_upper = "NULL"; - gchar *null_lower = "null"; - - if (scanner->config->case_sensitive) - { - if (value.v_identifier[0] == null_upper[0] && - value.v_identifier[1] == null_upper[1] && - value.v_identifier[2] == null_upper[2] && - value.v_identifier[3] == null_upper[3]) - token = G_TOKEN_IDENTIFIER_NULL; - } - else - { - if ((value.v_identifier[0] == null_upper[0] || - value.v_identifier[0] == null_lower[0]) && - (value.v_identifier[1] == null_upper[1] || - value.v_identifier[1] == null_lower[1]) && - (value.v_identifier[2] == null_upper[2] || - value.v_identifier[2] == null_lower[2]) && - (value.v_identifier[3] == null_upper[3] || - value.v_identifier[3] == null_lower[3])) - token = G_TOKEN_IDENTIFIER_NULL; - } - } - } - - *token_p = token; - *value_p = value; -} diff --git a/gscanner.h b/gscanner.h deleted file mode 100644 index d71bbdea5..000000000 --- a/gscanner.h +++ /dev/null @@ -1,271 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_SCANNER_H__ -#define __G_SCANNER_H__ - -#include <ghash.h> - -G_BEGIN_DECLS - -typedef struct _GScanner GScanner; -typedef struct _GScannerConfig GScannerConfig; -typedef union _GTokenValue GTokenValue; - -typedef void (*GScannerMsgFunc) (GScanner *scanner, - gchar *message, - gint error); - -/* GScanner: Flexible lexical scanner for general purpose. - */ - -/* Character sets */ -#define G_CSET_A_2_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -#define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz" -#define G_CSET_DIGITS "0123456789" -#define G_CSET_LATINC "\300\301\302\303\304\305\306"\ - "\307\310\311\312\313\314\315\316\317\320"\ - "\321\322\323\324\325\326"\ - "\330\331\332\333\334\335\336" -#define G_CSET_LATINS "\337\340\341\342\343\344\345\346"\ - "\347\350\351\352\353\354\355\356\357\360"\ - "\361\362\363\364\365\366"\ - "\370\371\372\373\374\375\376\377" - -/* Error types */ -typedef enum -{ - G_ERR_UNKNOWN, - G_ERR_UNEXP_EOF, - G_ERR_UNEXP_EOF_IN_STRING, - G_ERR_UNEXP_EOF_IN_COMMENT, - G_ERR_NON_DIGIT_IN_CONST, - G_ERR_DIGIT_RADIX, - G_ERR_FLOAT_RADIX, - G_ERR_FLOAT_MALFORMED -} GErrorType; - -/* Token types */ -typedef enum -{ - G_TOKEN_EOF = 0, - - G_TOKEN_LEFT_PAREN = '(', - G_TOKEN_RIGHT_PAREN = ')', - G_TOKEN_LEFT_CURLY = '{', - G_TOKEN_RIGHT_CURLY = '}', - G_TOKEN_LEFT_BRACE = '[', - G_TOKEN_RIGHT_BRACE = ']', - G_TOKEN_EQUAL_SIGN = '=', - G_TOKEN_COMMA = ',', - - G_TOKEN_NONE = 256, - - G_TOKEN_ERROR, - - G_TOKEN_CHAR, - G_TOKEN_BINARY, - G_TOKEN_OCTAL, - G_TOKEN_INT, - G_TOKEN_HEX, - G_TOKEN_FLOAT, - G_TOKEN_STRING, - - G_TOKEN_SYMBOL, - G_TOKEN_IDENTIFIER, - G_TOKEN_IDENTIFIER_NULL, - - G_TOKEN_COMMENT_SINGLE, - G_TOKEN_COMMENT_MULTI, - G_TOKEN_LAST -} GTokenType; - -union _GTokenValue -{ - gpointer v_symbol; - gchar *v_identifier; - gulong v_binary; - gulong v_octal; - gulong v_int; - gdouble v_float; - gulong v_hex; - gchar *v_string; - gchar *v_comment; - guchar v_char; - guint v_error; -}; - -struct _GScannerConfig -{ - /* Character sets - */ - gchar *cset_skip_characters; /* default: " \t\n" */ - gchar *cset_identifier_first; - gchar *cset_identifier_nth; - gchar *cpair_comment_single; /* default: "#\n" */ - - /* Should symbol lookup work case sensitive? - */ - guint case_sensitive : 1; - - /* Boolean values to be adjusted "on the fly" - * to configure scanning behaviour. - */ - guint skip_comment_multi : 1; /* C like comment */ - guint skip_comment_single : 1; /* single line comment */ - guint scan_comment_multi : 1; /* scan multi line comments? */ - guint scan_identifier : 1; - guint scan_identifier_1char : 1; - guint scan_identifier_NULL : 1; - guint scan_symbols : 1; - guint scan_binary : 1; - guint scan_octal : 1; - guint scan_float : 1; - guint scan_hex : 1; /* `0x0ff0' */ - guint scan_hex_dollar : 1; /* `$0ff0' */ - guint scan_string_sq : 1; /* string: 'anything' */ - guint scan_string_dq : 1; /* string: "\\-escapes!\n" */ - guint numbers_2_int : 1; /* bin, octal, hex => int */ - guint int_2_float : 1; /* int => G_TOKEN_FLOAT? */ - guint identifier_2_string : 1; - guint char_2_token : 1; /* return G_TOKEN_CHAR? */ - guint symbol_2_token : 1; - guint scope_0_fallback : 1; /* try scope 0 on lookups? */ -}; - -struct _GScanner -{ - /* unused fields */ - gpointer user_data; - guint max_parse_errors; - - /* g_scanner_error() increments this field */ - guint parse_errors; - - /* name of input stream, featured by the default message handler */ - const gchar *input_name; - - /* quarked data */ - GData *qdata; - - /* link into the scanner configuration */ - GScannerConfig *config; - - /* fields filled in after g_scanner_get_next_token() */ - GTokenType token; - GTokenValue value; - guint line; - guint position; - - /* fields filled in after g_scanner_peek_next_token() */ - GTokenType next_token; - GTokenValue next_value; - guint next_line; - guint next_position; - - /* to be considered private */ - GHashTable *symbol_table; - gint input_fd; - const gchar *text; - const gchar *text_end; - gchar *buffer; - guint scope_id; - - /* handler function for _warn and _error */ - GScannerMsgFunc msg_handler; -}; - -GScanner* g_scanner_new (const GScannerConfig *config_templ); -void g_scanner_destroy (GScanner *scanner); -void g_scanner_input_file (GScanner *scanner, - gint input_fd); -void g_scanner_sync_file_offset (GScanner *scanner); -void g_scanner_input_text (GScanner *scanner, - const gchar *text, - guint text_len); -GTokenType g_scanner_get_next_token (GScanner *scanner); -GTokenType g_scanner_peek_next_token (GScanner *scanner); -GTokenType g_scanner_cur_token (GScanner *scanner); -GTokenValue g_scanner_cur_value (GScanner *scanner); -guint g_scanner_cur_line (GScanner *scanner); -guint g_scanner_cur_position (GScanner *scanner); -gboolean g_scanner_eof (GScanner *scanner); -guint g_scanner_set_scope (GScanner *scanner, - guint scope_id); -void g_scanner_scope_add_symbol (GScanner *scanner, - guint scope_id, - const gchar *symbol, - gpointer value); -void g_scanner_scope_remove_symbol (GScanner *scanner, - guint scope_id, - const gchar *symbol); -gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, - guint scope_id, - const gchar *symbol); -void g_scanner_scope_foreach_symbol (GScanner *scanner, - guint scope_id, - GHFunc func, - gpointer user_data); -gpointer g_scanner_lookup_symbol (GScanner *scanner, - const gchar *symbol); -void g_scanner_unexp_token (GScanner *scanner, - GTokenType expected_token, - const gchar *identifier_spec, - const gchar *symbol_spec, - const gchar *symbol_name, - const gchar *message, - gint is_error); -void g_scanner_error (GScanner *scanner, - const gchar *format, - ...) G_GNUC_PRINTF (2,3); -void g_scanner_warn (GScanner *scanner, - const gchar *format, - ...) G_GNUC_PRINTF (2,3); -gint g_scanner_stat_mode (const gchar *filename); -/* keep downward source compatibility */ -#define g_scanner_add_symbol( scanner, symbol, value ) G_STMT_START { \ - g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \ -} G_STMT_END -#define g_scanner_remove_symbol( scanner, symbol ) G_STMT_START { \ - g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \ -} G_STMT_END -#define g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \ - g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \ -} G_STMT_END - -#ifndef G_DISABLE_DEPRECATED - -/* The following two functions are deprecated and will be removed in - * the next major release. They do no good. */ -#define g_scanner_freeze_symbol_table(scanner) ((void)0) -#define g_scanner_thaw_symbol_table(scanner) ((void)0) - -#endif /* G_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __G_SCANNER_H__ */ - diff --git a/gshell.c b/gshell.c deleted file mode 100644 index 79db9d36b..000000000 --- a/gshell.c +++ /dev/null @@ -1,651 +0,0 @@ -/* gshell.c - Shell-related utilities - * - * Copyright 2000 Red Hat, Inc. - * g_execvpe implementation based on GNU libc execvp: - * Copyright 1991, 92, 95, 96, 97, 98, 99 Free Software Foundation, Inc. - * - * GLib is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, write - * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "glib.h" -#include <string.h> - -#ifdef _ -#warning "FIXME remove gettext hack" -#endif - -#include "glibintl.h" - -GQuark -g_shell_error_quark (void) -{ - static GQuark quark = 0; - if (quark == 0) - quark = g_quark_from_static_string ("g-shell-error-quark"); - return quark; -} - -/* Single quotes preserve the literal string exactly. escape - * sequences are not allowed; not even \' - if you want a ' - * in the quoted text, you have to do something like 'foo'\''bar' - * - * Double quotes allow $ ` " \ and newline to be escaped with backslash. - * Otherwise double quotes preserve things literally. - */ - -static gboolean -unquote_string_inplace (gchar* str, gchar** end, GError** err) -{ - gchar* dest; - gchar* s; - gchar quote_char; - - g_return_val_if_fail(end != NULL, FALSE); - g_return_val_if_fail(err == NULL || *err == NULL, FALSE); - g_return_val_if_fail(str != NULL, FALSE); - - dest = s = str; - - quote_char = *s; - - if (!(*s == '"' || *s == '\'')) - { - if (err) - *err = g_error_new(G_SHELL_ERROR, - G_SHELL_ERROR_BAD_QUOTING, - _("Quoted text doesn't begin with a quotation mark")); - *end = str; - return FALSE; - } - - /* Skip the initial quote mark */ - ++s; - - if (quote_char == '"') - { - while (*s) - { - g_assert(s > dest); /* loop invariant */ - - switch (*s) - { - case '"': - /* End of the string, return now */ - *dest = '\0'; - ++s; - *end = s; - return TRUE; - break; - - case '\\': - /* Possible escaped quote or \ */ - ++s; - switch (*s) - { - case '"': - case '\\': - case '`': - case '$': - case '\n': - *dest = *s; - ++s; - ++dest; - break; - - default: - /* not an escaped char */ - *dest = '\\'; - ++dest; - /* ++s already done. */ - break; - } - break; - - default: - *dest = *s; - ++dest; - ++s; - break; - } - - g_assert(s > dest); /* loop invariant */ - } - } - else - { - while (*s) - { - g_assert(s > dest); /* loop invariant */ - - if (*s == '\'') - { - /* End of the string, return now */ - *dest = '\0'; - ++s; - *end = s; - return TRUE; - } - else - { - *dest = *s; - ++dest; - ++s; - } - - g_assert(s > dest); /* loop invariant */ - } - } - - /* If we reach here this means the close quote was never encountered */ - - *dest = '\0'; - - if (err) - *err = g_error_new(G_SHELL_ERROR, - G_SHELL_ERROR_BAD_QUOTING, - _("Unmatched quotation mark in command line or other shell-quoted text")); - *end = s; - return FALSE; -} - -/** - * g_shell_quote: - * @unquoted_string: a literal string - * - * Quotes a string so that the shell (/bin/sh) will interpret the - * quoted string to mean @unquoted_string. If you pass a filename to - * the shell, for example, you should first quote it with this - * function. The return value must be freed with g_free(). The - * quoting style used is undefined (single or double quotes may be - * used). - * - * Return value: quoted string - **/ -gchar* -g_shell_quote (const gchar *unquoted_string) -{ - /* We always use single quotes, because the algorithm is cheesier. - * We could use double if we felt like it, that might be more - * human-readable. - */ - - const gchar *p; - GString *dest; - - g_return_val_if_fail (unquoted_string != NULL, NULL); - - dest = g_string_new ("'"); - - p = unquoted_string; - - /* could speed this up a lot by appending chunks of text at a - * time. - */ - while (*p) - { - /* Replace literal ' with a close ', a \', and a open ' */ - if (*p == '\'') - g_string_append (dest, "'\''"); - else - g_string_append_c (dest, *p); - - ++p; - } - - /* close the quote */ - g_string_append_c (dest, '\''); - - return g_string_free (dest, FALSE); -} - -/** - * g_shell_unquote: - * @quoted_string: shell-quoted string - * @error: error return location or NULL - * - * Unquotes a string as the shell (/bin/sh) would. Only handles - * quotes; if a string contains file globs, arithmetic operators, - * variables, backticks, redirections, or other special-to-the-shell - * features, the result will be different from the result a real shell - * would produce (the variables, backticks, etc. will be passed - * through literally instead of being expanded). This function is - * guaranteed to succeed if applied to the result of - * g_shell_quote(). If it fails, it returns NULL and sets the - * error. The @quoted_string need not actually contain quoted or - * escaped text; g_shell_unquote() simply goes through the string and - * unquotes/unescapes anything that the shell would. Both single and - * double quotes are handled, as are escapes including escaped - * newlines. The return value must be freed with g_free(). Possible - * errors are in the #G_SHELL_ERROR domain. - * - * Return value: an unquoted string - **/ -gchar* -g_shell_unquote (const gchar *quoted_string, - GError **error) -{ - gchar *unquoted; - gchar *end; - gchar *start; - GString *retval; - - g_return_val_if_fail (quoted_string != NULL, NULL); - - unquoted = g_strdup (quoted_string); - - start = unquoted; - end = unquoted; - retval = g_string_new (""); - - /* The loop allows cases such as - * "foo"blah blah'bar'woo foo"baz"la la la\'\''foo' - */ - while (*start) - { - /* Append all non-quoted chars, honoring backslash escape - */ - - while (*start && !(*start == '"' || *start == '\'')) - { - if (*start == '\\') - { - /* all characters can get escaped by backslash, - * except newline, which is removed if it follows - * a backslash outside of quotes - */ - - ++start; - if (*start) - { - if (*start != '\n') - g_string_append_c (retval, *start); - ++start; - } - } - else - { - g_string_append_c (retval, *start); - ++start; - } - } - - if (*start) - { - if (!unquote_string_inplace (start, &end, error)) - { - goto error; - } - else - { - g_string_append (retval, start); - start = end; - } - } - } - - return g_string_free (retval, FALSE); - - error: - g_assert (error == NULL || *error != NULL); - - g_free (unquoted); - g_string_free (retval, TRUE); - return NULL; -} - -/* g_parse_argv() does a semi-arbitrary weird subset of the way - * the shell parses a command line. We don't do variable expansion, - * don't understand that operators are tokens, don't do tilde expansion, - * don't do command substitution, no arithmetic expansion, IFS gets ignored, - * don't do filename globs, don't remove redirection stuff, etc. - * - * READ THE UNIX98 SPEC on "Shell Command Language" before changing - * the behavior of this code. - * - * Steps to parsing the argv string: - * - * - tokenize the string (but since we ignore operators, - * our tokenization may diverge from what the shell would do) - * note that tokenization ignores the internals of a quoted - * word and it always splits on spaces, not on IFS even - * if we used IFS. We also ignore "end of input indicator" - * (I guess this is control-D?) - * - * Tokenization steps, from UNIX98 with operator stuff removed, - * are: - * - * 1) "If the current character is backslash, single-quote or - * double-quote (\, ' or ") and it is not quoted, it will affect - * quoting for subsequent characters up to the end of the quoted - * text. The rules for quoting are as described in Quoting - * . During token recognition no substitutions will be actually - * performed, and the result token will contain exactly the - * characters that appear in the input (except for newline - * character joining), unmodified, including any embedded or - * enclosing quotes or substitution operators, between the quote - * mark and the end of the quoted text. The token will not be - * delimited by the end of the quoted field." - * - * 2) "If the current character is an unquoted newline character, - * the current token will be delimited." - * - * 3) "If the current character is an unquoted blank character, any - * token containing the previous character is delimited and the - * current character will be discarded." - * - * 4) "If the previous character was part of a word, the current - * character will be appended to that word." - * - * 5) "If the current character is a "#", it and all subsequent - * characters up to, but excluding, the next newline character - * will be discarded as a comment. The newline character that - * ends the line is not considered part of the comment. The - * "#" starts a comment only when it is at the beginning of a - * token. Since the search for the end-of-comment does not - * consider an escaped newline character specially, a comment - * cannot be continued to the next line." - * - * 6) "The current character will be used as the start of a new word." - * - * - * - for each token (word), perform portions of word expansion, namely - * field splitting (using default whitespace IFS) and quote - * removal. Field splitting may increase the number of words. - * Quote removal does not increase the number of words. - * - * "If the complete expansion appropriate for a word results in an - * empty field, that empty field will be deleted from the list of - * fields that form the completely expanded command, unless the - * original word contained single-quote or double-quote characters." - * - UNIX98 spec - * - * - */ - -static inline void -ensure_token (GString **token) -{ - if (*token == NULL) - *token = g_string_new (""); -} - -static void -delimit_token (GString **token, - GSList **retval) -{ - if (*token == NULL) - return; - - *retval = g_slist_prepend (*retval, g_string_free (*token, FALSE)); - - *token = NULL; -} - -static GSList* -tokenize_command_line (const gchar *command_line, - GError **error) -{ - gchar current_quote; - const gchar *p; - GString *current_token = NULL; - GSList *retval = NULL; - - current_quote = '\0'; - p = command_line; - - while (*p) - { - if (current_quote == '\\') - { - if (*p == '\n') - { - /* we append nothing; backslash-newline become nothing */ - } - else - { - /* we append the backslash and the current char, - * to be interpreted later after tokenization - */ - ensure_token (¤t_token); - g_string_append_c (current_token, '\\'); - g_string_append_c (current_token, *p); - } - - current_quote = '\0'; - } - else if (current_quote == '#') - { - /* Discard up to and including next newline */ - while (*p && *p != '\n') - ++p; - - current_quote = '\0'; - - if (*p == '\0') - break; - } - else if (current_quote) - { - if (*p == current_quote && - /* check that it isn't an escaped double quote */ - !(current_quote == '"' && p != command_line && *(p - 1) == '\\')) - { - /* close the quote */ - current_quote = '\0'; - } - - /* Everything inside quotes, and the close quote, - * gets appended literally. - */ - - ensure_token (¤t_token); - g_string_append_c (current_token, *p); - } - else - { - switch (*p) - { - case '\n': - delimit_token (¤t_token, &retval); - break; - - case ' ': - case '\t': - /* If the current token contains the previous char, delimit - * the current token. A nonzero length - * token should always contain the previous char. - */ - if (current_token && - current_token->len > 0) - { - delimit_token (¤t_token, &retval); - } - - /* discard all unquoted blanks (don't add them to a token) */ - break; - - - /* single/double quotes are appended to the token, - * escapes are maybe appended next time through the loop, - * comment chars are never appended. - */ - - case '\'': - case '"': - ensure_token (¤t_token); - g_string_append_c (current_token, *p); - - /* FALL THRU */ - - case '#': - case '\\': - current_quote = *p; - break; - - default: - /* Combines rules 4) and 6) - if we have a token, append to it, - * otherwise create a new token. - */ - ensure_token (¤t_token); - g_string_append_c (current_token, *p); - break; - } - } - - ++p; - } - - delimit_token (¤t_token, &retval); - - if (current_quote) - { - if (current_quote == '\\') - g_set_error (error, - G_SHELL_ERROR, - G_SHELL_ERROR_BAD_QUOTING, - _("Text ended just after a '\' character." - " (The text was '%s')"), - command_line); - else - g_set_error (error, - G_SHELL_ERROR, - G_SHELL_ERROR_BAD_QUOTING, - _("Text ended before matching quote was found for %c." - " (The text was '%s')"), - current_quote, command_line); - - goto error; - } - - if (retval == NULL) - { - g_set_error (error, - G_SHELL_ERROR, - G_SHELL_ERROR_EMPTY_STRING, - _("Text was empty (or contained only whitespace)")); - - goto error; - } - - /* we appended backward */ - retval = g_slist_reverse (retval); - - return retval; - - error: - g_assert (error == NULL || *error != NULL); - - if (retval) - { - g_slist_foreach (retval, (GFunc)g_free, NULL); - g_slist_free (retval); - } - - return NULL; -} - -/** - * g_shell_parse_argv: - * @command_line: command line to parse - * @argcp: return location for number of args - * @argvp: return location for array of args - * @error: return location for error - * - * Parses a command line into an argument vector, in much the same way - * the shell would, but without many of the expansions the shell would - * perform (variable expansion, globs, operators, filename expansion, - * etc. are not supported). The results are defined to be the same as - * those you would get from a UNIX98 /bin/sh, as long as the input - * contains none of the unsupported shell expansions. If the input - * does contain such expansions, they are passed through - * literally. Possible errors are those from the #G_SHELL_ERROR - * domain. - * - * Return value: TRUE on success, FALSE if error set - **/ -gboolean -g_shell_parse_argv (const gchar *command_line, - gint *argcp, - gchar ***argvp, - GError **error) -{ - /* Code based on poptParseArgvString() from libpopt */ - gint argc = 0; - gchar **argv = NULL; - GSList *tokens = NULL; - gint i; - GSList *tmp_list; - - g_return_val_if_fail (command_line != NULL, FALSE); - - tokens = tokenize_command_line (command_line, error); - if (tokens == NULL) - return FALSE; - - /* Because we can't have introduced any new blank space into the - * tokens (we didn't do any new expansions), we don't need to - * perform field splitting. If we were going to honor IFS or do any - * expansions, we would have to do field splitting on each word - * here. Also, if we were going to do any expansion we would need to - * remove any zero-length words that didn't contain quotes - * originally; but since there's no expansion we know all words have - * nonzero length, unless they contain quotes. - * - * So, we simply remove quotes, and don't do any field splitting or - * empty word removal, since we know there was no way to introduce - * such things. - */ - - argc = g_slist_length (tokens); - argv = g_new0 (gchar*, argc + 1); - i = 0; - tmp_list = tokens; - while (tmp_list) - { - argv[i] = g_shell_unquote (tmp_list->data, error); - - /* Since we already checked that quotes matched up in the - * tokenizer, this shouldn't be possible to reach I guess. - */ - if (argv[i] == NULL) - goto failed; - - tmp_list = g_slist_next (tmp_list); - ++i; - } - - g_slist_foreach (tokens, (GFunc)g_free, NULL); - g_slist_free (tokens); - - if (argcp) - *argcp = argc; - - if (argvp) - *argvp = argv; - else - g_strfreev (argv); - - return TRUE; - - failed: - - g_assert (error == NULL || *error != NULL); - g_strfreev (argv); - g_slist_foreach (tokens, (GFunc) g_free, NULL); - g_slist_free (tokens); - - return FALSE; -} diff --git a/gshell.h b/gshell.h deleted file mode 100644 index c433cbaeb..000000000 --- a/gshell.h +++ /dev/null @@ -1,53 +0,0 @@ -/* gshell.h - Shell-related utilities - * - * Copyright 2000 Red Hat, Inc. - * - * GLib is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, write - * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __G_SHELL_H__ -#define __G_SHELL_H__ - -#include <gerror.h> - -G_BEGIN_DECLS - -#define G_SHELL_ERROR g_shell_error_quark () - -typedef enum -{ - /* mismatched or otherwise mangled quoting */ - G_SHELL_ERROR_BAD_QUOTING, - /* string to be parsed was empty */ - G_SHELL_ERROR_EMPTY_STRING, - G_SHELL_ERROR_FAILED -} GShellError; - -GQuark g_shell_error_quark (void); - -gchar* g_shell_quote (const gchar *unquoted_string); -gchar* g_shell_unquote (const gchar *quoted_string, - GError **error); -gboolean g_shell_parse_argv (const gchar *command_line, - gint *argcp, - gchar ***argvp, - GError **error); - -G_END_DECLS - -#endif /* __G_SHELL_H__ */ - - diff --git a/gslist.c b/gslist.c deleted file mode 100644 index 4dafb98be..000000000 --- a/gslist.c +++ /dev/null @@ -1,728 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glib.h" - - -#ifndef DISABLE_MEM_POOLS -struct _GAllocator /* from gmem.c */ -{ - gchar *name; - guint16 n_preallocs; - guint is_unused : 1; - guint type : 4; - GAllocator *last; - GMemChunk *mem_chunk; - GSList *free_lists; /* implementation specific */ -}; - -G_LOCK_DEFINE_STATIC (current_allocator); -static GAllocator *current_allocator = NULL; - -/* HOLDS: current_allocator_lock */ -static void -g_slist_validate_allocator (GAllocator *allocator) -{ - g_return_if_fail (allocator != NULL); - g_return_if_fail (allocator->is_unused == TRUE); - - if (allocator->type != G_ALLOCATOR_SLIST) - { - allocator->type = G_ALLOCATOR_SLIST; - if (allocator->mem_chunk) - { - g_mem_chunk_destroy (allocator->mem_chunk); - allocator->mem_chunk = NULL; - } - } - - if (!allocator->mem_chunk) - { - allocator->mem_chunk = g_mem_chunk_new (allocator->name, - sizeof (GSList), - sizeof (GSList) * allocator->n_preallocs, - G_ALLOC_ONLY); - allocator->free_lists = NULL; - } - - allocator->is_unused = FALSE; -} - -void -g_slist_push_allocator (GAllocator *allocator) -{ - G_LOCK (current_allocator); - g_slist_validate_allocator (allocator); - allocator->last = current_allocator; - current_allocator = allocator; - G_UNLOCK (current_allocator); -} - -void -g_slist_pop_allocator (void) -{ - G_LOCK (current_allocator); - if (current_allocator) - { - GAllocator *allocator; - - allocator = current_allocator; - current_allocator = allocator->last; - allocator->last = NULL; - allocator->is_unused = TRUE; - } - G_UNLOCK (current_allocator); -} - -static inline GSList* -_g_slist_alloc (void) -{ - GSList *list; - - G_LOCK (current_allocator); - if (!current_allocator) - { - GAllocator *allocator = g_allocator_new ("GLib default GSList allocator", - 128); - g_slist_validate_allocator (allocator); - allocator->last = NULL; - current_allocator = allocator; - } - if (!current_allocator->free_lists) - { - list = g_chunk_new (GSList, current_allocator->mem_chunk); - list->data = NULL; - } - else - { - if (current_allocator->free_lists->data) - { - list = current_allocator->free_lists->data; - current_allocator->free_lists->data = list->next; - list->data = NULL; - } - else - { - list = current_allocator->free_lists; - current_allocator->free_lists = list->next; - } - } - G_UNLOCK (current_allocator); - - list->next = NULL; - - return list; -} - -GSList* -g_slist_alloc (void) -{ - return _g_slist_alloc (); -} - -void -g_slist_free (GSList *list) -{ - if (list) - { - GSList *last_node = list; - -#ifdef ENABLE_GC_FRIENDLY - while (last_node->next) - { - last_node->data = NULL; - last_node = last_node->next; - } - last_node->data = NULL; -#else /* !ENABLE_GC_FRIENDLY */ - list->data = list->next; -#endif /* ENABLE_GC_FRIENDLY */ - - G_LOCK (current_allocator); - last_node->next = current_allocator->free_lists; - current_allocator->free_lists = list; - G_UNLOCK (current_allocator); - } -} - -static inline void -_g_slist_free_1 (GSList *list) -{ - if (list) - { - list->data = NULL; - G_LOCK (current_allocator); - list->next = current_allocator->free_lists; - current_allocator->free_lists = list; - G_UNLOCK (current_allocator); - } -} - -void -g_slist_free_1 (GSList *list) -{ - _g_slist_free_1 (list); -} -#else /* DISABLE_MEM_POOLS */ - -#define _g_slist_alloc g_slist_alloc -GSList* -g_slist_alloc (void) -{ - GSList *list; - - list = g_new0 (GSList, 1); - - return list; -} - -void -g_slist_free (GSList *list) -{ - GSList *last; - - while (list) - { - last = list; - list = list->next; - g_free (last); - } -} - -#define _g_slist_free_1 g_slist_free_1 -void -g_slist_free_1 (GSList *list) -{ - g_free (list); -} - -#endif - -GSList* -g_slist_append (GSList *list, - gpointer data) -{ - GSList *new_list; - GSList *last; - - new_list = _g_slist_alloc (); - new_list->data = data; - - if (list) - { - last = g_slist_last (list); - /* g_assert (last != NULL); */ - last->next = new_list; - - return list; - } - else - return new_list; -} - -GSList* -g_slist_prepend (GSList *list, - gpointer data) -{ - GSList *new_list; - - new_list = _g_slist_alloc (); - new_list->data = data; - new_list->next = list; - - return new_list; -} - -GSList* -g_slist_insert (GSList *list, - gpointer data, - gint position) -{ - GSList *prev_list; - GSList *tmp_list; - GSList *new_list; - - if (position < 0) - return g_slist_append (list, data); - else if (position == 0) - return g_slist_prepend (list, data); - - new_list = _g_slist_alloc (); - new_list->data = data; - - if (!list) - return new_list; - - prev_list = NULL; - tmp_list = list; - - while ((position-- > 0) && tmp_list) - { - prev_list = tmp_list; - tmp_list = tmp_list->next; - } - - if (prev_list) - { - new_list->next = prev_list->next; - prev_list->next = new_list; - } - else - { - new_list->next = list; - list = new_list; - } - - return list; -} - -GSList * -g_slist_concat (GSList *list1, GSList *list2) -{ - if (list2) - { - if (list1) - g_slist_last (list1)->next = list2; - else - list1 = list2; - } - - return list1; -} - -GSList* -g_slist_remove (GSList *list, - gconstpointer data) -{ - GSList *tmp, *prev = NULL; - - tmp = list; - while (tmp) - { - if (tmp->data == data) - { - if (prev) - prev->next = tmp->next; - else - list = tmp->next; - - g_slist_free_1 (tmp); - break; - } - prev = tmp; - tmp = prev->next; - } - - return list; -} - -GSList* -g_slist_remove_all (GSList *list, - gconstpointer data) -{ - GSList *tmp, *prev = NULL; - - tmp = list; - while (tmp) - { - if (tmp->data == data) - { - GSList *next = tmp->next; - - if (prev) - prev->next = next; - else - list = next; - - g_slist_free_1 (tmp); - tmp = next; - } - else - { - prev = tmp; - tmp = prev->next; - } - } - - return list; -} - -static inline GSList* -_g_slist_remove_link (GSList *list, - GSList *link) -{ - GSList *tmp; - GSList *prev; - - prev = NULL; - tmp = list; - - while (tmp) - { - if (tmp == link) - { - if (prev) - prev->next = tmp->next; - if (list == tmp) - list = list->next; - - tmp->next = NULL; - break; - } - - prev = tmp; - tmp = tmp->next; - } - - return list; -} - -GSList* -g_slist_remove_link (GSList *list, - GSList *link) -{ - return _g_slist_remove_link (list, link); -} - -GSList* -g_slist_delete_link (GSList *list, - GSList *link) -{ - list = _g_slist_remove_link (list, link); - _g_slist_free_1 (link); - - return list; -} - -GSList* -g_slist_copy (GSList *list) -{ - GSList *new_list = NULL; - - if (list) - { - GSList *last; - - new_list = _g_slist_alloc (); - new_list->data = list->data; - last = new_list; - list = list->next; - while (list) - { - last->next = _g_slist_alloc (); - last = last->next; - last->data = list->data; - list = list->next; - } - } - - return new_list; -} - -GSList* -g_slist_reverse (GSList *list) -{ - GSList *prev = NULL; - - while (list) - { - GSList *next = list->next; - - list->next = prev; - - prev = list; - list = next; - } - - return prev; -} - -GSList* -g_slist_nth (GSList *list, - guint n) -{ - while (n-- > 0 && list) - list = list->next; - - return list; -} - -gpointer -g_slist_nth_data (GSList *list, - guint n) -{ - while (n-- > 0 && list) - list = list->next; - - return list ? list->data : NULL; -} - -GSList* -g_slist_find (GSList *list, - gconstpointer data) -{ - while (list) - { - if (list->data == data) - break; - list = list->next; - } - - return list; -} - -GSList* -g_slist_find_custom (GSList *list, - gconstpointer data, - GCompareFunc func) -{ - g_return_val_if_fail (func != NULL, list); - - while (list) - { - if (! func (list->data, data)) - return list; - list = list->next; - } - - return NULL; -} - -gint -g_slist_position (GSList *list, - GSList *link) -{ - gint i; - - i = 0; - while (list) - { - if (list == link) - return i; - i++; - list = list->next; - } - - return -1; -} - -gint -g_slist_index (GSList *list, - gconstpointer data) -{ - gint i; - - i = 0; - while (list) - { - if (list->data == data) - return i; - i++; - list = list->next; - } - - return -1; -} - -GSList* -g_slist_last (GSList *list) -{ - if (list) - { - while (list->next) - list = list->next; - } - - return list; -} - -guint -g_slist_length (GSList *list) -{ - guint length; - - length = 0; - while (list) - { - length++; - list = list->next; - } - - return length; -} - -void -g_slist_foreach (GSList *list, - GFunc func, - gpointer user_data) -{ - while (list) - { - GSList *next = list->next; - (*func) (list->data, user_data); - list = next; - } -} - -GSList* -g_slist_insert_sorted (GSList *list, - gpointer data, - GCompareFunc func) -{ - GSList *tmp_list = list; - GSList *prev_list = NULL; - GSList *new_list; - gint cmp; - - g_return_val_if_fail (func != NULL, list); - - if (!list) - { - new_list = _g_slist_alloc (); - new_list->data = data; - return new_list; - } - - cmp = (*func) (data, tmp_list->data); - - while ((tmp_list->next) && (cmp > 0)) - { - prev_list = tmp_list; - tmp_list = tmp_list->next; - cmp = (*func) (data, tmp_list->data); - } - - new_list = _g_slist_alloc (); - new_list->data = data; - - if ((!tmp_list->next) && (cmp > 0)) - { - tmp_list->next = new_list; - return list; - } - - if (prev_list) - { - prev_list->next = new_list; - new_list->next = tmp_list; - return list; - } - else - { - new_list->next = list; - return new_list; - } -} - -static GSList * -g_slist_sort_merge (GSList *l1, - GSList *l2, - GFunc compare_func, - gboolean use_data, - gpointer user_data) -{ - GSList list, *l; - gint cmp; - - l=&list; - - while (l1 && l2) - { - if (use_data) - cmp = ((GCompareDataFunc) compare_func) (l1->data, l2->data, user_data); - else - cmp = ((GCompareFunc) compare_func) (l1->data, l2->data); - - if (cmp <= 0) - { - l=l->next=l1; - l1=l1->next; - } - else - { - l=l->next=l2; - l2=l2->next; - } - } - l->next= l1 ? l1 : l2; - - return list.next; -} - -static GSList * -g_slist_sort_real (GSList *list, - GFunc compare_func, - gboolean use_data, - gpointer user_data) -{ - GSList *l1, *l2; - - if (!list) - return NULL; - if (!list->next) - return list; - - l1 = list; - l2 = list->next; - - while ((l2 = l2->next) != NULL) - { - if ((l2 = l2->next) == NULL) - break; - l1=l1->next; - } - l2 = l1->next; - l1->next = NULL; - - return g_slist_sort_merge (g_slist_sort_real (list, compare_func, use_data, user_data), - g_slist_sort_real (l2, compare_func, use_data, user_data), - compare_func, - use_data, - user_data); -} - -GSList * -g_slist_sort (GSList *list, - GCompareFunc compare_func) -{ - return g_slist_sort_real (list, (GFunc) compare_func, FALSE, NULL); -} - -GSList * -g_slist_sort_with_data (GSList *list, - GCompareDataFunc compare_func, - gpointer user_data) -{ - return g_slist_sort_real (list, (GFunc) compare_func, TRUE, user_data); -} diff --git a/gslist.h b/gslist.h deleted file mode 100644 index 00d3fc336..000000000 --- a/gslist.h +++ /dev/null @@ -1,102 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_SLIST_H__ -#define __G_SLIST_H__ - -#include <gmem.h> - -G_BEGIN_DECLS - -typedef struct _GSList GSList; - -struct _GSList -{ - gpointer data; - GSList *next; -}; - -/* Singly linked lists - */ -void g_slist_push_allocator (GAllocator *allocator); -void g_slist_pop_allocator (void); -GSList* g_slist_alloc (void); -void g_slist_free (GSList *list); -void g_slist_free_1 (GSList *list); -GSList* g_slist_append (GSList *list, - gpointer data); -GSList* g_slist_prepend (GSList *list, - gpointer data); -GSList* g_slist_insert (GSList *list, - gpointer data, - gint position); -GSList* g_slist_insert_sorted (GSList *list, - gpointer data, - GCompareFunc func); -GSList* g_slist_insert_before (GSList *slist, - GSList *sibling, - gpointer data); -GSList* g_slist_concat (GSList *list1, - GSList *list2); -GSList* g_slist_remove (GSList *list, - gconstpointer data); -GSList* g_slist_remove_all (GSList *list, - gconstpointer data); -GSList* g_slist_remove_link (GSList *list, - GSList *link); -GSList* g_slist_delete_link (GSList *list, - GSList *link); -GSList* g_slist_reverse (GSList *list); -GSList* g_slist_copy (GSList *list); -GSList* g_slist_nth (GSList *list, - guint n); -GSList* g_slist_find (GSList *list, - gconstpointer data); -GSList* g_slist_find_custom (GSList *list, - gconstpointer data, - GCompareFunc func); -gint g_slist_position (GSList *list, - GSList *llink); -gint g_slist_index (GSList *list, - gconstpointer data); -GSList* g_slist_last (GSList *list); -guint g_slist_length (GSList *list); -void g_slist_foreach (GSList *list, - GFunc func, - gpointer user_data); -GSList* g_slist_sort (GSList *list, - GCompareFunc compare_func); -GSList* g_slist_sort_with_data (GSList *list, - GCompareDataFunc compare_func, - gpointer user_data); -gpointer g_slist_nth_data (GSList *list, - guint n); -#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL) - -G_END_DECLS - -#endif /* __G_SLIST_H__ */ - diff --git a/gspawn-win32-helper.c b/gspawn-win32-helper.c deleted file mode 100644 index cd419b2ff..000000000 --- a/gspawn-win32-helper.c +++ /dev/null @@ -1,218 +0,0 @@ -/* gspawn-win32-helper.c - Helper program for process launching on Win32. - * - * Copyright 2000 Red Hat, Inc. - * Copyright 2000 Tor Lillqvist - * - * GLib is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, write - * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#undef G_LOG_DOMAIN -#include "glib.h" -#define GSPAWN_HELPER -#include "gspawn-win32.c" /* For shared definitions */ - -static void -write_err_and_exit (gint fd, - gint msg) -{ - gint en = errno; - - write (fd, &msg, sizeof(msg)); - write (fd, &en, sizeof(en)); - - _exit (1); -} - -#ifdef __GNUC__ -# ifndef _stdcall -# define _stdcall __attribute__((stdcall)) -# endif -#endif - -/* We build gspawn-win32-helper.exe as a Windows GUI application - * to avoid any temporarily flashing console windows in case - * the gspawn function is invoked by a GUI program. Thus, no main() - * but a WinMain(). We do, however, still use argc and argv tucked - * away in the global __argc and __argv by the C runtime startup code. - */ - -int _stdcall -WinMain (struct HINSTANCE__ *hInstance, - struct HINSTANCE__ *hPrevInstance, - char *lpszCmdLine, - int nCmdShow) -{ - int child_err_report_fd; - int i; - int fd; - int mode; - GString *debugstring; - - SETUP_DEBUG(); - - if (debug) - { - debugstring = g_string_new (""); - - g_string_append (debugstring, - g_strdup_printf ("g-spawn-win32-helper: " - "argc = %d, argv: ", - __argc)); - for (i = 0; i < __argc; i++) - { - if (i > 0) - g_string_append (debugstring, " "); - g_string_append (debugstring, __argv[i]); - } - - MessageBox (NULL, debugstring->str, "gspawn-win32-helper", 0); - } - - g_assert (__argc >= ARG_COUNT); - - /* argv[ARG_CHILD_ERR_REPORT] is the file descriptor onto which - * write error messages. - */ - child_err_report_fd = atoi (__argv[ARG_CHILD_ERR_REPORT]); - - /* argv[ARG_STDIN..ARG_STDERR] are the file descriptors that should - * be dup2'd to stdin, stdout and stderr, '-' if the corresponding - * std* should be let alone, and 'z' if it should be connected to - * the bit bucket NUL:. - */ - if (__argv[ARG_STDIN][0] == '-') - ; /* Nothing */ - else if (__argv[ARG_STDIN][0] == 'z') - { - fd = open ("NUL:", O_RDONLY); - if (fd != 0) - { - dup2 (fd, 0); - close (fd); - } - } - else - { - fd = atoi (__argv[ARG_STDIN]); - if (fd != 0) - { - dup2 (fd, 0); - close (fd); - } - } - - if (__argv[ARG_STDOUT][0] == '-') - ; /* Nothing */ - else if (__argv[ARG_STDOUT][0] == 'z') - { - fd = open ("NUL:", O_WRONLY); - if (fd != 1) - { - dup2 (fd, 1); - close (fd); - } - } - else - { - fd = atoi (__argv[ARG_STDOUT]); - if (fd != 1) - { - dup2 (fd, 1); - close (fd); - } - } - - if (__argv[ARG_STDERR][0] == '-') - ; /* Nothing */ - else if (__argv[ARG_STDERR][0] == 'z') - { - fd = open ("NUL:", O_WRONLY); - if (fd != 2) - { - dup2 (fd, 2); - close (fd); - } - } - else - { - fd = atoi (__argv[ARG_STDERR]); - if (fd != 2) - { - dup2 (fd, 2); - close (fd); - } - } - - /* __argv[ARG_WORKING_DIRECTORY] is the directory in which to run the - * process. If "-", don't change directory. - */ - if (__argv[ARG_WORKING_DIRECTORY][0] == '-' && - __argv[ARG_WORKING_DIRECTORY][1] == 0) - ; /* Nothing */ - else if (chdir (__argv[ARG_WORKING_DIRECTORY]) < 0) - write_err_and_exit (child_err_report_fd, - CHILD_CHDIR_FAILED); - - /* __argv[ARG_CLOSE_DESCRIPTORS] is "y" if file descriptors from 3 - * upwards should be closed - */ - - if (__argv[ARG_CLOSE_DESCRIPTORS][0] == 'y') - for (i = 3; i < 1000; i++) /* FIXME real limit? */ - if (i != child_err_report_fd) - close (i); - - /* __argv[ARG_WAIT] is "w" to wait for the program to exit */ - - if (__argv[ARG_WAIT][0] == 'w') - mode = P_WAIT; - else - mode = P_NOWAIT; - - /* __argv[ARG_USE_PATH] is "y" to use PATH, otherwise not */ - - /* __argv[ARG_PROGRAM] is program file to run, - * __argv[ARG_PROGRAM+1]... is its __argv. - */ - - if (debug) - { - debugstring = g_string_new (""); - g_string_append (debugstring, - g_strdup_printf ("calling %s on program %s, __argv: ", - (__argv[ARG_USE_PATH][0] == 'y' ? - "spawnvp" : "spawnv"), - __argv[ARG_PROGRAM])); - i = ARG_PROGRAM+1; - while (__argv[i]) - g_string_append (debugstring, __argv[i++]); - MessageBox (NULL, debugstring->str, "gspawn-win32-helper", 0); - } - - if (__argv[ARG_USE_PATH][0] == 'y') - { - if (spawnvp (mode, __argv[ARG_PROGRAM], __argv+ARG_PROGRAM) < 0) - write_err_and_exit (child_err_report_fd, CHILD_SPAWN_FAILED); - } - else - { - if (spawnv (mode, __argv[ARG_PROGRAM], __argv+ARG_PROGRAM) < 0) - write_err_and_exit (child_err_report_fd, CHILD_SPAWN_FAILED); - } - - return 0; -} - diff --git a/gspawn-win32.c b/gspawn-win32.c deleted file mode 100644 index d92744a94..000000000 --- a/gspawn-win32.c +++ /dev/null @@ -1,987 +0,0 @@ -/* gspawn-win32.c - Process launching on Win32 - * - * Copyright 2000 Red Hat, Inc. - * - * GLib is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, write - * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Implementation details on Win32. - * - * - There is no way to set the no-inherit flag for - * a "file descriptor" in the MS C runtime. The flag is there, - * and the dospawn() function uses it, but unfortunately - * this flag can only be set when opening the file. - * - As there is no fork(), we cannot reliably change directory - * before starting the child process. (There might be several threads - * running, and the current directory is common for all threads.) - * - * Thus, we must in most cases use a helper program to handle closing - * of (inherited) file descriptors and changing of directory. In fact, - * we do it all the time. - * - * This source file contains the source for that helper program. - * To compile it, #define GSPAWN_HELPER. - */ - -/* Define this to get some logging all the time */ -/* #define G_SPAWN_WIN32_DEBUG */ - -#include "glib.h" - -#include <string.h> -#include <stdlib.h> -#include <stdio.h> - -#include <windows.h> -#include <errno.h> -#include <fcntl.h> -#include <io.h> -#include <process.h> -#include <direct.h> - -#include "glibintl.h" - -#ifdef G_SPAWN_WIN32_DEBUG - static int debug = 1; - #define SETUP_DEBUG() /* empty */ - -#else - static int debug = -1; - #define SETUP_DEBUG() \ - G_STMT_START \ - { \ - if (debug == -1) \ - { \ - if (getenv ("G_SPAWN_WIN32_DEBUG") != NULL) \ - debug = 1; \ - else \ - debug = 0; \ - } \ - } \ - G_STMT_END -#endif - -enum -{ - CHILD_NO_ERROR, - CHILD_CHDIR_FAILED, - CHILD_SPAWN_FAILED, -}; - -enum { - ARG_CHILD_ERR_REPORT = 1, - ARG_STDIN, - ARG_STDOUT, - ARG_STDERR, - ARG_WORKING_DIRECTORY, - ARG_CLOSE_DESCRIPTORS, - ARG_USE_PATH, - ARG_WAIT, - ARG_PROGRAM, - ARG_COUNT = ARG_PROGRAM -}; - -#ifndef GSPAWN_HELPER - -static gboolean make_pipe (gint p[2], - GError **error); -static gboolean fork_exec_with_pipes (gboolean dont_wait, - const gchar *working_directory, - gchar **argv, - gchar **envp, - gboolean close_descriptors, - gboolean search_path, - gboolean stdout_to_null, - gboolean stderr_to_null, - gboolean child_inherits_stdin, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *standard_input, - gint *standard_output, - gint *standard_error, - gint *exit_status, - GError **error); - -GQuark -g_spawn_error_quark (void) -{ - static GQuark quark = 0; - if (quark == 0) - quark = g_quark_from_static_string ("g-exec-error-quark"); - return quark; -} - -/** - * g_spawn_async: - * @working_directory: child's current working directory, or NULL to inherit parent's - * @argv: child's argument vector - * @envp: child's environment, or NULL to inherit parent's - * @flags: flags from #GSpawnFlags - * @child_setup: function to run in the child just before exec() - * @user_data: user data for @child_setup - * @child_pid: return location for child process ID, or NULL - * @error: return location for error - * - * See g_spawn_async_with_pipes() for a full description; this function - * simply calls the g_spawn_async_with_pipes() without any pipes. - * - * Return value: TRUE on success, FALSE if error is set - **/ -gboolean -g_spawn_async (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *child_pid, - GError **error) -{ - g_return_val_if_fail (argv != NULL, FALSE); - - return g_spawn_async_with_pipes (working_directory, - argv, envp, - flags, - child_setup, - user_data, - child_pid, - NULL, NULL, NULL, - error); -} - -/* Avoids a danger in threaded situations (calling close() - * on a file descriptor twice, and another thread has - * re-opened it since the first close) - */ -static gint -close_and_invalidate (gint *fd) -{ - gint ret; - - ret = close (*fd); - *fd = -1; - - return ret; -} - -typedef enum -{ - READ_FAILED = 0, /* FALSE */ - READ_OK, - READ_EOF -} ReadResult; - -static ReadResult -read_data (GString *str, - GIOChannel *iochannel, - GError **error) -{ - GIOError gioerror; - gint bytes; - gchar buf[4096]; - - again: - - gioerror = g_io_channel_read (iochannel, buf, sizeof (buf), &bytes); - - if (bytes == 0) - return READ_EOF; - else if (bytes > 0) - { - g_string_append_len (str, buf, bytes); - return READ_OK; - } - else if (gioerror == G_IO_ERROR_AGAIN) - goto again; - else if (gioerror != G_IO_ERROR_NONE) - { - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_READ, - _("Failed to read data from child process")); - - return READ_FAILED; - } - else - return READ_OK; -} - -/** - * g_spawn_sync: - * @working_directory: child's current working directory, or NULL to inherit parent's - * @argv: child's argument vector - * @envp: child's environment, or NULL to inherit parent's - * @flags: flags from #GSpawnFlags - * @child_setup: function to run in the child just before exec() - * @user_data: user data for @child_setup - * @standard_output: return location for child output - * @standard_error: return location for child error messages - * @exit_status: child exit status, as returned by waitpid() - * @error: return location for error - * - * Executes a child synchronously (waits for the child to exit before returning). - * All output from the child is stored in @standard_output and @standard_error, - * if those parameters are non-NULL. If @exit_status is non-NULL, the exit status - * of the child is stored there as it would be by waitpid(); standard UNIX - * macros such as WIFEXITED() and WEXITSTATUS() must be used to evaluate the - * exit status. If an error occurs, no data is returned in @standard_output, - * @standard_error, or @exit_status. - * - * This function calls g_spawn_async_with_pipes() internally; see that function - * for full details on the other parameters. - * - * Return value: TRUE on success, FALSE if an error was set. - **/ -gboolean -g_spawn_sync (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gchar **standard_output, - gchar **standard_error, - gint *exit_status, - GError **error) -{ - gint outpipe = -1; - gint errpipe = -1; - GIOChannel *outchannel = NULL; - GIOChannel *errchannel = NULL; - GPollFD outfd, errfd; - GPollFD fds[2]; - gint nfds; - gint outindex = -1; - gint errindex = -1; - gint ret; - GString *outstr = NULL; - GString *errstr = NULL; - gboolean failed; - gint status; - - g_return_val_if_fail (argv != NULL, FALSE); - g_return_val_if_fail (!(flags & G_SPAWN_DO_NOT_REAP_CHILD), FALSE); - g_return_val_if_fail (standard_output == NULL || - !(flags & G_SPAWN_STDOUT_TO_DEV_NULL), FALSE); - g_return_val_if_fail (standard_error == NULL || - !(flags & G_SPAWN_STDERR_TO_DEV_NULL), FALSE); - - /* Just to ensure segfaults if callers try to use - * these when an error is reported. - */ - if (standard_output) - *standard_output = NULL; - - if (standard_error) - *standard_error = NULL; - - if (!fork_exec_with_pipes (FALSE, - working_directory, - argv, - envp, - !(flags & G_SPAWN_LEAVE_DESCRIPTORS_OPEN), - (flags & G_SPAWN_SEARCH_PATH) != 0, - (flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0, - (flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0, - (flags & G_SPAWN_CHILD_INHERITS_STDIN) != 0, - child_setup, - user_data, - NULL, - standard_output ? &outpipe : NULL, - standard_error ? &errpipe : NULL, - &status, - error)) - return FALSE; - - /* Read data from child. */ - - failed = FALSE; - - if (outpipe >= 0) - { - outstr = g_string_new (""); - outchannel = g_io_channel_win32_new_fd (outpipe); - g_io_channel_win32_make_pollfd (outchannel, - G_IO_IN | G_IO_ERR | G_IO_HUP, - &outfd); - } - - if (errpipe >= 0) - { - errstr = g_string_new (""); - errchannel = g_io_channel_win32_new_fd (errpipe); - g_io_channel_win32_make_pollfd (errchannel, - G_IO_IN | G_IO_ERR | G_IO_HUP, - &errfd); - } - - /* Read data until we get EOF on both pipes. */ - while (!failed && - (outpipe >= 0 || - errpipe >= 0)) - { - nfds = 0; - if (outpipe >= 0) - { - fds[nfds] = outfd; - outindex = nfds; - nfds++; - } - if (errpipe >= 0) - { - fds[nfds] = errfd; - errindex = nfds; - nfds++; - } - - if (debug) - g_print ("%s:g_spawn_sync: calling g_io_channel_win32_poll, nfds=%d\n", - __FILE__, nfds); - - ret = g_io_channel_win32_poll (fds, nfds, -1); - - if (ret < 0) - { - failed = TRUE; - - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_READ, - _("Unexpected error in g_io_channel_win32_poll() reading data from a child process")); - - break; - } - - if (outpipe >= 0 && (fds[outindex].revents & G_IO_IN)) - { - switch (read_data (outstr, outchannel, error)) - { - case READ_FAILED: - if (debug) - g_print ("g_spawn_sync: outchannel: READ_FAILED\n"); - failed = TRUE; - break; - case READ_EOF: - if (debug) - g_print ("g_spawn_sync: outchannel: READ_EOF\n"); - g_io_channel_unref (outchannel); - outchannel = NULL; - close_and_invalidate (&outpipe); - break; - default: - if (debug) - g_print ("g_spawn_sync: outchannel: OK\n"); - break; - } - - if (failed) - break; - } - - if (errpipe >= 0 && (fds[errindex].revents & G_IO_IN)) - { - switch (read_data (errstr, errchannel, error)) - { - case READ_FAILED: - if (debug) - g_print ("g_spawn_sync: errchannel: READ_FAILED\n"); - failed = TRUE; - break; - case READ_EOF: - if (debug) - g_print ("g_spawn_sync: errchannel: READ_EOF\n"); - g_io_channel_unref (errchannel); - errchannel = NULL; - close_and_invalidate (&errpipe); - break; - default: - if (debug) - g_print ("g_spawn_sync: errchannel: OK\n"); - break; - } - - if (failed) - break; - } - } - - /* These should only be open still if we had an error. */ - - if (outchannel != NULL) - g_io_channel_unref (outchannel); - if (errchannel != NULL) - g_io_channel_unref (errchannel); - if (outpipe >= 0) - close_and_invalidate (&outpipe); - if (errpipe >= 0) - close_and_invalidate (&errpipe); - - if (failed) - { - if (outstr) - g_string_free (outstr, TRUE); - if (errstr) - g_string_free (errstr, TRUE); - - return FALSE; - } - else - { - if (exit_status) - *exit_status = status; - - if (standard_output) - *standard_output = g_string_free (outstr, FALSE); - - if (standard_error) - *standard_error = g_string_free (errstr, FALSE); - - return TRUE; - } -} - -/** - * g_spawn_async_with_pipes: - * @working_directory: child's current working directory, or NULL to inherit parent's - * @argv: child's argument vector - * @envp: child's environment, or NULL to inherit parent's - * @flags: flags from #GSpawnFlags - * @child_setup: function to run in the child just before exec() - * @user_data: user data for @child_setup - * @child_pid: return location for child process ID, or NULL - * @standard_input: return location for file descriptor to write to child's stdin, or NULL - * @standard_output: return location for file descriptor to read child's stdout, or NULL - * @standard_error: return location for file descriptor to read child's stderr, or NULL - * @error: return location for error - * - * Executes a child program asynchronously (your program will not - * block waiting for the child to exit). The child program is - * specified by the only argument that must be provided, @argv. @argv - * should be a NULL-terminated array of strings, to be passed as the - * argument vector for the child. The first string in @argv is of - * course the name of the program to execute. By default, the name of - * the program must be a full path; the PATH shell variable will only - * be searched if you pass the %G_SPAWN_SEARCH_PATH flag. - * - * @envp is a NULL-terminated array of strings, where each string - * has the form <literal>KEY=VALUE</literal>. This will become - * the child's environment. If @envp is NULL, the child inherits its - * parent's environment. - * - * @flags should be the bitwise OR of any flags you want to affect the - * function's behavior. The %G_SPAWN_DO_NOT_REAP_CHILD means that the - * child will not be automatically reaped; you must call waitpid() or - * handle SIGCHLD yourself, or the child will become a zombie. - * %G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that the parent's open file - * descriptors will be inherited by the child; otherwise all - * descriptors except stdin/stdout/stderr will be closed before - * calling exec() in the child. %G_SPAWN_SEARCH_PATH means that - * <literal>argv[0]</literal> need not be an absolute path, it - * will be looked for in the user's PATH. %G_SPAWN_STDOUT_TO_DEV_NULL - * means that the child's standad output will be discarded, instead - * of going to the same location as the parent's standard output. - * %G_SPAWN_STDERR_TO_DEV_NULL means that the child's standard error - * will be discarded. %G_SPAWN_CHILD_INHERITS_STDIN means that - * the child will inherit the parent's standard input (by default, - * the child's standard input is attached to /dev/null). - * - * @child_setup and @user_data are a function and user data to be - * called in the child after GLib has performed all the setup it plans - * to perform (including creating pipes, closing file descriptors, - * etc.) but before calling exec(). That is, @child_setup is called - * just before calling exec() in the child. Obviously actions taken in - * this function will only affect the child, not the parent. - * - * If non-NULL, @child_pid will be filled with the child's process - * ID. You can use the process ID to send signals to the child, or - * to waitpid() if you specified the %G_SPAWN_DO_NOT_REAP_CHILD flag. - * - * If non-NULL, the @standard_input, @standard_output, @standard_error - * locations will be filled with file descriptors for writing to the child's - * standard input or reading from its standard output or standard error. - * The caller of g_spawn_async_with_pipes() must close these file descriptors - * when they are no longer in use. If these parameters are NULL, the - * corresponding pipe won't be created. - * - * @error can be NULL to ignore errors, or non-NULL to report errors. - * If an error is set, the function returns FALSE. Errors - * are reported even if they occur in the child (for example if the - * executable in <literal>argv[0]</literal> is not found). Typically - * the <literal>message</literal> field of returned errors should be displayed - * to users. Possible errors are those from the #G_SPAWN_ERROR domain. - * - * If an error occurs, @child_pid, @standard_input, @standard_output, - * and @standard_error will not be filled with valid values. - * - * Return value: TRUE on success, FALSE if an error was set - **/ -gboolean -g_spawn_async_with_pipes (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *child_pid, - gint *standard_input, - gint *standard_output, - gint *standard_error, - GError **error) -{ - g_return_val_if_fail (argv != NULL, FALSE); - g_return_val_if_fail (standard_output == NULL || - !(flags & G_SPAWN_STDOUT_TO_DEV_NULL), FALSE); - g_return_val_if_fail (standard_error == NULL || - !(flags & G_SPAWN_STDERR_TO_DEV_NULL), FALSE); - /* can't inherit stdin if we have an input pipe. */ - g_return_val_if_fail (standard_input == NULL || - !(flags & G_SPAWN_CHILD_INHERITS_STDIN), FALSE); - - return fork_exec_with_pipes (!(flags & G_SPAWN_DO_NOT_REAP_CHILD), - working_directory, - argv, - envp, - !(flags & G_SPAWN_LEAVE_DESCRIPTORS_OPEN), - (flags & G_SPAWN_SEARCH_PATH) != 0, - (flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0, - (flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0, - (flags & G_SPAWN_CHILD_INHERITS_STDIN) != 0, - child_setup, - user_data, - standard_input, - standard_output, - standard_error, - NULL, - error); -} - -/** - * g_spawn_command_line_sync: - * @command_line: a command line - * @standard_output: return location for child output - * @standard_error: return location for child errors - * @exit_status: return location for child exit status - * @error: return location for errors - * - * A simple version of g_spawn_sync() with little-used parameters - * removed, taking a command line instead of an argument vector. See - * g_spawn_sync() for full details. @command_line will be parsed by - * g_shell_parse_argv(). Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag - * is enabled. Note that %G_SPAWN_SEARCH_PATH can have security - * implications, so consider using g_spawn_sync() directly if - * appropriate. Possible errors are those from g_spawn_sync() and those - * from g_shell_parse_argv(). - * - * Return value: TRUE on success, FALSE if an error was set - **/ -gboolean -g_spawn_command_line_sync (const gchar *command_line, - gchar **standard_output, - gchar **standard_error, - gint *exit_status, - GError **error) -{ - gboolean retval; - gchar **argv = 0; - - g_return_val_if_fail (command_line != NULL, FALSE); - - if (!g_shell_parse_argv (command_line, - NULL, &argv, - error)) - return FALSE; - - retval = g_spawn_sync (NULL, - argv, - NULL, - G_SPAWN_SEARCH_PATH, - NULL, - NULL, - standard_output, - standard_error, - exit_status, - error); - g_strfreev (argv); - - return retval; -} - -/** - * g_spawn_command_line_async: - * @command_line: a command line - * @error: return location for errors - * - * A simple version of g_spawn_async() that parses a command line with - * g_shell_parse_argv() and passes it to g_spawn_async(). Runs a - * command line in the background. Unlike g_spawn_async(), the - * %G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note - * that %G_SPAWN_SEARCH_PATH can have security implications, so - * consider using g_spawn_async() directly if appropriate. Possible - * errors are those from g_shell_parse_argv() and g_spawn_async(). - * - * Return value: TRUE on success, FALSE if error is set. - **/ -gboolean -g_spawn_command_line_async (const gchar *command_line, - GError **error) -{ - gboolean retval; - gchar **argv = 0; - - g_return_val_if_fail (command_line != NULL, FALSE); - - if (!g_shell_parse_argv (command_line, - NULL, &argv, - error)) - return FALSE; - - retval = g_spawn_async (NULL, - argv, - NULL, - G_SPAWN_SEARCH_PATH, - NULL, - NULL, - NULL, - error); - g_strfreev (argv); - - return retval; -} - -static gint -do_exec (gboolean dont_wait, - gint child_err_report_fd, - gint stdin_fd, - gint stdout_fd, - gint stderr_fd, - const gchar *working_directory, - gchar **argv, - gchar **envp, - gboolean close_descriptors, - gboolean search_path, - gboolean stdout_to_null, - gboolean stderr_to_null, - gboolean child_inherits_stdin, - GSpawnChildSetupFunc child_setup, - gpointer user_data) -{ - gchar **new_argv; - gchar args[ARG_COUNT][10]; - gint i; - int argc = 0; - - SETUP_DEBUG(); - - while (argv[argc]) - ++argc; - - new_argv = g_new (gchar *, argc + 1 + ARG_COUNT); - - new_argv[0] = "gspawn-win32-helper"; - sprintf (args[ARG_CHILD_ERR_REPORT], "%d", child_err_report_fd); - new_argv[ARG_CHILD_ERR_REPORT] = args[ARG_CHILD_ERR_REPORT]; - - if (stdin_fd >= 0) - { - sprintf (args[ARG_STDIN], "%d", stdin_fd); - new_argv[ARG_STDIN] = args[ARG_STDIN]; - } - else if (child_inherits_stdin) - { - /* Let stdin be alone */ - new_argv[ARG_STDIN] = "-"; - } - else - { - /* Keep process from blocking on a read of stdin */ - new_argv[ARG_STDIN] = "z"; - } - - if (stdout_fd >= 0) - { - sprintf (args[ARG_STDOUT], "%d", stdout_fd); - new_argv[ARG_STDOUT] = args[ARG_STDOUT]; - } - else if (stdout_to_null) - { - new_argv[ARG_STDOUT] = "z"; - } - else - { - new_argv[ARG_STDOUT] = "-"; - } - - if (stderr_fd >= 0) - { - sprintf (args[ARG_STDERR], "%d", stderr_fd); - new_argv[ARG_STDERR] = args[ARG_STDERR]; - } - else if (stderr_to_null) - { - new_argv[ARG_STDERR] = "z"; - } - else - { - new_argv[ARG_STDERR] = "-"; - } - - if (working_directory && *working_directory) - new_argv[ARG_WORKING_DIRECTORY] = working_directory; - else - new_argv[ARG_WORKING_DIRECTORY] = "-"; - - if (close_descriptors) - new_argv[ARG_CLOSE_DESCRIPTORS] = "y"; - else - new_argv[ARG_CLOSE_DESCRIPTORS] = "-"; - - if (search_path) - new_argv[ARG_USE_PATH] = "y"; - else - new_argv[ARG_USE_PATH] = "-"; - - if (dont_wait) - new_argv[ARG_WAIT] = "-"; - else - new_argv[ARG_WAIT] = "w"; - - for (i = 0; i <= argc; i++) - new_argv[ARG_PROGRAM + i] = argv[i]; - - /* Call user function just before we execute the helper program, - * which executes the program. Dunno what's the usefulness of this. - * A child setup function used on Unix probably isn't of much use - * as such on Win32, anyhow. - */ - if (child_setup) - { - (* child_setup) (user_data); - } - - if (debug) - { - g_print ("calling gspawn-win32-helper with argv:\n"); - for (i = 0; i < argc + 1 + ARG_COUNT; i++) - g_print ("argv[%d]: %s\n", i, (new_argv[i] ? new_argv[i] : "NULL")); - } - - if (envp != NULL) - /* Let's hope envp hasn't mucked with PATH so that - * gspawn-win32-helper.exe isn't found. - */ - spawnvpe (P_NOWAIT, "gspawn-win32-helper", new_argv, envp); - else - spawnvp (P_NOWAIT, "gspawn-win32-helper", new_argv); - - /* FIXME: What if gspawn-win32-helper.exe isn't found? */ - - /* Close the child_err_report_fd and the other process's ends of the - * pipes in this process, otherwise the reader will never get - * EOF. - */ - close (child_err_report_fd); - if (stdin_fd >= 0) - close (stdin_fd); - if (stdout_fd >= 0) - close (stdout_fd); - if (stderr_fd >= 0) - close (stderr_fd); - - g_free (new_argv); - - return 0; -} - -static gboolean -read_ints (int fd, - gint* buf, - gint n_ints_in_buf, - gint *n_ints_read, - GError **error) -{ - gint bytes = 0; - - while (bytes < sizeof(gint)*n_ints_in_buf) - { - gint chunk; - - if (debug) - g_print ("%s:read_ints: trying to read %d bytes from pipe...\n", - __FILE__, - sizeof(gint)*n_ints_in_buf - bytes); - - chunk = read (fd, ((gchar*)buf) + bytes, - sizeof(gint)*n_ints_in_buf - bytes); - - if (debug) - g_print ("... got %d bytes\n", chunk); - - if (chunk < 0) - { - /* Some weird shit happened, bail out */ - - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FAILED, - _("Failed to read from child pipe (%s)"), - g_strerror (errno)); - - return FALSE; - } - else if (chunk == 0) - break; /* EOF */ - else - bytes += chunk; - } - - *n_ints_read = bytes/sizeof(gint); - - return TRUE; -} - -static gboolean -fork_exec_with_pipes (gboolean dont_wait, - const gchar *working_directory, - gchar **argv, - gchar **envp, - gboolean close_descriptors, - gboolean search_path, - gboolean stdout_to_null, - gboolean stderr_to_null, - gboolean child_inherits_stdin, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *standard_input, - gint *standard_output, - gint *standard_error, - gint *exit_status, - GError **error) -{ - gint stdin_pipe[2] = { -1, -1 }; - gint stdout_pipe[2] = { -1, -1 }; - gint stderr_pipe[2] = { -1, -1 }; - gint child_err_report_pipe[2] = { -1, -1 }; - gint status; - gint bytes; - gint buf[2]; - gint n_ints = 0; - - if (!make_pipe (child_err_report_pipe, error)) - return FALSE; - - if (standard_input && !make_pipe (stdin_pipe, error)) - goto cleanup_and_fail; - - if (standard_output && !make_pipe (stdout_pipe, error)) - goto cleanup_and_fail; - - if (standard_error && !make_pipe (stderr_pipe, error)) - goto cleanup_and_fail; - - status = do_exec (dont_wait, - child_err_report_pipe[1], - stdin_pipe[0], - stdout_pipe[1], - stderr_pipe[1], - working_directory, - argv, - envp, - close_descriptors, - search_path, - stdout_to_null, - stderr_to_null, - child_inherits_stdin, - child_setup, - user_data); - - if (!read_ints (child_err_report_pipe[0], - buf, 2, &n_ints, - error)) - goto cleanup_and_fail; - - if (n_ints == 2) - { - /* Error from the child. */ - - switch (buf[0]) - { - case CHILD_NO_ERROR: - break; - - case CHILD_CHDIR_FAILED: - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_CHDIR, - _("Failed to change to directory '%s' (%s)"), - working_directory, - g_strerror (buf[1])); - goto cleanup_and_fail; - - case CHILD_SPAWN_FAILED: - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FAILED, - _("Failed to execute child process (%s)"), - g_strerror (buf[1])); - goto cleanup_and_fail; - } - } - - /* Success against all odds! return the information */ - - if (standard_input) - *standard_input = stdin_pipe[1]; - if (standard_output) - *standard_output = stdout_pipe[0]; - if (standard_error) - *standard_error = stderr_pipe[0]; - if (exit_status) - *exit_status = status; - - return TRUE; - - cleanup_and_fail: - close_and_invalidate (&child_err_report_pipe[0]); - close_and_invalidate (&child_err_report_pipe[1]); - close_and_invalidate (&stdin_pipe[0]); - close_and_invalidate (&stdin_pipe[1]); - close_and_invalidate (&stdout_pipe[0]); - close_and_invalidate (&stdout_pipe[1]); - close_and_invalidate (&stderr_pipe[0]); - close_and_invalidate (&stderr_pipe[1]); - - return FALSE; -} - -static gboolean -make_pipe (gint p[2], - GError **error) -{ - if (pipe (p) < 0) - { - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FAILED, - _("Failed to create pipe for communicating with child process (%s)"), - g_strerror (errno)); - return FALSE; - } - else - return TRUE; -} - -#endif /* !GSPAWN_HELPER */ diff --git a/gspawn.c b/gspawn.c deleted file mode 100644 index 8dc0e4b13..000000000 --- a/gspawn.c +++ /dev/null @@ -1,1404 +0,0 @@ -/* gspawn.c - Process launching - * - * Copyright 2000 Red Hat, Inc. - * g_execvpe implementation based on GNU libc execvp: - * Copyright 1991, 92, 95, 96, 97, 98, 99 Free Software Foundation, Inc. - * - * GLib is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, write - * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "glib.h" -#include <sys/time.h> -#include <sys/types.h> -#include <sys/wait.h> -#include <unistd.h> -#include <errno.h> -#include <fcntl.h> -#include <signal.h> -#include <string.h> - -#ifdef HAVE_SYS_SELECT_H -#include <sys/select.h> -#endif /* HAVE_SYS_SELECT_H */ - -#include "glibintl.h" - -static gint g_execute (const gchar *file, - gchar **argv, - gchar **envp, - gboolean search_path); - -static gboolean make_pipe (gint p[2], - GError **error); -static gboolean fork_exec_with_pipes (gboolean intermediate_child, - const gchar *working_directory, - gchar **argv, - gchar **envp, - gboolean close_descriptors, - gboolean search_path, - gboolean stdout_to_null, - gboolean stderr_to_null, - gboolean child_inherits_stdin, - gboolean file_and_argv_zero, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *child_pid, - gint *standard_input, - gint *standard_output, - gint *standard_error, - GError **error); - -GQuark -g_spawn_error_quark (void) -{ - static GQuark quark = 0; - if (quark == 0) - quark = g_quark_from_static_string ("g-exec-error-quark"); - return quark; -} - -/** - * g_spawn_async: - * @working_directory: child's current working directory, or NULL to inherit parent's - * @argv: child's argument vector - * @envp: child's environment, or NULL to inherit parent's - * @flags: flags from #GSpawnFlags - * @child_setup: function to run in the child just before exec() - * @user_data: user data for @child_setup - * @child_pid: return location for child process ID, or NULL - * @error: return location for error - * - * See g_spawn_async_with_pipes() for a full description; this function - * simply calls the g_spawn_async_with_pipes() without any pipes. - * - * Return value: TRUE on success, FALSE if error is set - **/ -gboolean -g_spawn_async (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *child_pid, - GError **error) -{ - g_return_val_if_fail (argv != NULL, FALSE); - - return g_spawn_async_with_pipes (working_directory, - argv, envp, - flags, - child_setup, - user_data, - child_pid, - NULL, NULL, NULL, - error); -} - -/* Avoids a danger in threaded situations (calling close() - * on a file descriptor twice, and another thread has - * re-opened it since the first close) - */ -static gint -close_and_invalidate (gint *fd) -{ - gint ret; - - ret = close (*fd); - *fd = -1; - - return ret; -} - -typedef enum -{ - READ_FAILED = 0, /* FALSE */ - READ_OK, - READ_EOF -} ReadResult; - -static ReadResult -read_data (GString *str, - gint fd, - GError **error) -{ - gssize bytes; - gchar buf[4096]; - - again: - - bytes = read (fd, &buf, 4096); - - if (bytes == 0) - return READ_EOF; - else if (bytes > 0) - { - g_string_append_len (str, buf, bytes); - return READ_OK; - } - else if (bytes < 0 && errno == EINTR) - goto again; - else if (bytes < 0) - { - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_READ, - _("Failed to read data from child process (%s)"), - g_strerror (errno)); - - return READ_FAILED; - } - else - return READ_OK; -} - -/** - * g_spawn_sync: - * @working_directory: child's current working directory, or NULL to inherit parent's - * @argv: child's argument vector - * @envp: child's environment, or NULL to inherit parent's - * @flags: flags from #GSpawnFlags - * @child_setup: function to run in the child just before exec() - * @user_data: user data for @child_setup - * @standard_output: return location for child output - * @standard_error: return location for child error messages - * @exit_status: child exit status, as returned by waitpid() - * @error: return location for error - * - * Executes a child synchronously (waits for the child to exit before returning). - * All output from the child is stored in @standard_output and @standard_error, - * if those parameters are non-NULL. If @exit_status is non-NULL, the exit status - * of the child is stored there as it would be by waitpid(); standard UNIX - * macros such as WIFEXITED() and WEXITSTATUS() must be used to evaluate the - * exit status. If an error occurs, no data is returned in @standard_output, - * @standard_error, or @exit_status. - * - * This function calls g_spawn_async_with_pipes() internally; see that function - * for full details on the other parameters. - * - * Return value: TRUE on success, FALSE if an error was set. - **/ -gboolean -g_spawn_sync (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gchar **standard_output, - gchar **standard_error, - gint *exit_status, - GError **error) -{ - gint outpipe = -1; - gint errpipe = -1; - gint pid; - fd_set fds; - gint ret; - GString *outstr = NULL; - GString *errstr = NULL; - gboolean failed; - gint status; - - g_return_val_if_fail (argv != NULL, FALSE); - g_return_val_if_fail (!(flags & G_SPAWN_DO_NOT_REAP_CHILD), FALSE); - g_return_val_if_fail (standard_output == NULL || - !(flags & G_SPAWN_STDOUT_TO_DEV_NULL), FALSE); - g_return_val_if_fail (standard_error == NULL || - !(flags & G_SPAWN_STDERR_TO_DEV_NULL), FALSE); - - /* Just to ensure segfaults if callers try to use - * these when an error is reported. - */ - if (standard_output) - *standard_output = NULL; - - if (standard_error) - *standard_error = NULL; - - if (!fork_exec_with_pipes (FALSE, - working_directory, - argv, - envp, - !(flags & G_SPAWN_LEAVE_DESCRIPTORS_OPEN), - (flags & G_SPAWN_SEARCH_PATH) != 0, - (flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0, - (flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0, - (flags & G_SPAWN_CHILD_INHERITS_STDIN) != 0, - (flags & G_SPAWN_FILE_AND_ARGV_ZERO) != 0, - child_setup, - user_data, - &pid, - NULL, - standard_output ? &outpipe : NULL, - standard_error ? &errpipe : NULL, - error)) - return FALSE; - - /* Read data from child. */ - - failed = FALSE; - - if (outpipe >= 0) - { - outstr = g_string_new (""); - } - - if (errpipe >= 0) - { - errstr = g_string_new (""); - } - - /* Read data until we get EOF on both pipes. */ - while (!failed && - (outpipe >= 0 || - errpipe >= 0)) - { - ret = 0; - - FD_ZERO (&fds); - if (outpipe >= 0) - FD_SET (outpipe, &fds); - if (errpipe >= 0) - FD_SET (errpipe, &fds); - - ret = select (MAX (outpipe, errpipe) + 1, - &fds, - NULL, NULL, - NULL /* no timeout */); - - if (ret < 0 && errno != EINTR) - { - failed = TRUE; - - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_READ, - _("Unexpected error in select() reading data from a child process (%s)"), - g_strerror (errno)); - - break; - } - - if (outpipe >= 0 && FD_ISSET (outpipe, &fds)) - { - switch (read_data (outstr, outpipe, error)) - { - case READ_FAILED: - failed = TRUE; - break; - case READ_EOF: - close_and_invalidate (&outpipe); - outpipe = -1; - break; - default: - break; - } - - if (failed) - break; - } - - if (errpipe >= 0 && FD_ISSET (errpipe, &fds)) - { - switch (read_data (errstr, errpipe, error)) - { - case READ_FAILED: - failed = TRUE; - break; - case READ_EOF: - close_and_invalidate (&errpipe); - errpipe = -1; - break; - default: - break; - } - - if (failed) - break; - } - } - - /* These should only be open still if we had an error. */ - - if (outpipe >= 0) - close_and_invalidate (&outpipe); - if (errpipe >= 0) - close_and_invalidate (&errpipe); - - /* Wait for child to exit, even if we have - * an error pending. - */ - again: - - ret = waitpid (pid, &status, 0); - - if (ret < 0) - { - if (errno == EINTR) - goto again; - else if (errno == ECHILD) - { - if (exit_status) - { - g_warning ("In call to g_spawn_sync(), exit status of a child process was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit status can't be returned. This is a bug in the program calling g_spawn_sync(); either don't request the exit status, or don't set the SIGCHLD action."); - } - else - { - /* We don't need the exit status. */ - } - } - else - { - if (!failed) /* avoid error pileups */ - { - failed = TRUE; - - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_READ, - _("Unexpected error in waitpid() (%s)"), - g_strerror (errno)); - } - } - } - - if (failed) - { - if (outstr) - g_string_free (outstr, TRUE); - if (errstr) - g_string_free (errstr, TRUE); - - return FALSE; - } - else - { - if (exit_status) - *exit_status = status; - - if (standard_output) - *standard_output = g_string_free (outstr, FALSE); - - if (standard_error) - *standard_error = g_string_free (errstr, FALSE); - - return TRUE; - } -} - -/** - * g_spawn_async_with_pipes: - * @working_directory: child's current working directory, or NULL to inherit parent's - * @argv: child's argument vector - * @envp: child's environment, or NULL to inherit parent's - * @flags: flags from #GSpawnFlags - * @child_setup: function to run in the child just before exec() - * @user_data: user data for @child_setup - * @child_pid: return location for child process ID, or NULL - * @standard_input: return location for file descriptor to write to child's stdin, or NULL - * @standard_output: return location for file descriptor to read child's stdout, or NULL - * @standard_error: return location for file descriptor to read child's stderr, or NULL - * @error: return location for error - * - * Executes a child program asynchronously (your program will not - * block waiting for the child to exit). The child program is - * specified by the only argument that must be provided, @argv. @argv - * should be a NULL-terminated array of strings, to be passed as the - * argument vector for the child. The first string in @argv is of - * course the name of the program to execute. By default, the name of - * the program must be a full path; the PATH shell variable will only - * be searched if you pass the %G_SPAWN_SEARCH_PATH flag. - * - * @envp is a NULL-terminated array of strings, where each string - * has the form <literal>KEY=VALUE</literal>. This will become - * the child's environment. If @envp is NULL, the child inherits its - * parent's environment. - * - * @flags should be the bitwise OR of any flags you want to affect the - * function's behavior. The %G_SPAWN_DO_NOT_REAP_CHILD means that the - * child will not be automatically reaped; you must call waitpid() or - * handle SIGCHLD yourself, or the child will become a zombie. - * %G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that the parent's open file - * descriptors will be inherited by the child; otherwise all - * descriptors except stdin/stdout/stderr will be closed before - * calling exec() in the child. %G_SPAWN_SEARCH_PATH means that - * <literal>argv[0]</literal> need not be an absolute path, it - * will be looked for in the user's PATH. %G_SPAWN_STDOUT_TO_DEV_NULL - * means that the child's standad output will be discarded, instead - * of going to the same location as the parent's standard output. - * %G_SPAWN_STDERR_TO_DEV_NULL means that the child's standard error - * will be discarded. %G_SPAWN_CHILD_INHERITS_STDIN means that - * the child will inherit the parent's standard input (by default, - * the child's standard input is attached to /dev/null). - * %G_SPAWN_FILE_AND_ARGV_ZERO means that the first element of @argv is - * the file to execute, while the remaining elements are the - * actual argument vector to pass to the file. Normally - * g_spawn_async_with_pipes() uses @argv[0] as the file to execute, and - * passes all of @argv to the child. - * - * @child_setup and @user_data are a function and user data to be - * called in the child after GLib has performed all the setup it plans - * to perform (including creating pipes, closing file descriptors, - * etc.) but before calling exec(). That is, @child_setup is called - * just before calling exec() in the child. Obviously actions taken in - * this function will only affect the child, not the parent. - * - * If non-NULL, @child_pid will be filled with the child's process - * ID. You can use the process ID to send signals to the child, or - * to waitpid() if you specified the %G_SPAWN_DO_NOT_REAP_CHILD flag. - * - * If non-NULL, the @standard_input, @standard_output, @standard_error - * locations will be filled with file descriptors for writing to the child's - * standard input or reading from its standard output or standard error. - * The caller of g_spawn_async_with_pipes() must close these file descriptors - * when they are no longer in use. If these parameters are NULL, the - * corresponding pipe won't be created. - * - * @error can be NULL to ignore errors, or non-NULL to report errors. - * If an error is set, the function returns FALSE. Errors - * are reported even if they occur in the child (for example if the - * executable in <literal>argv[0]</literal> is not found). Typically - * the <literal>message</literal> field of returned errors should be displayed - * to users. Possible errors are those from the #G_SPAWN_ERROR domain. - * - * If an error occurs, @child_pid, @standard_input, @standard_output, - * and @standard_error will not be filled with valid values. - * - * Return value: TRUE on success, FALSE if an error was set - **/ -gboolean -g_spawn_async_with_pipes (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *child_pid, - gint *standard_input, - gint *standard_output, - gint *standard_error, - GError **error) -{ - g_return_val_if_fail (argv != NULL, FALSE); - g_return_val_if_fail (standard_output == NULL || - !(flags & G_SPAWN_STDOUT_TO_DEV_NULL), FALSE); - g_return_val_if_fail (standard_error == NULL || - !(flags & G_SPAWN_STDERR_TO_DEV_NULL), FALSE); - /* can't inherit stdin if we have an input pipe. */ - g_return_val_if_fail (standard_input == NULL || - !(flags & G_SPAWN_CHILD_INHERITS_STDIN), FALSE); - - return fork_exec_with_pipes (!(flags & G_SPAWN_DO_NOT_REAP_CHILD), - working_directory, - argv, - envp, - !(flags & G_SPAWN_LEAVE_DESCRIPTORS_OPEN), - (flags & G_SPAWN_SEARCH_PATH) != 0, - (flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0, - (flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0, - (flags & G_SPAWN_CHILD_INHERITS_STDIN) != 0, - (flags & G_SPAWN_FILE_AND_ARGV_ZERO) != 0, - child_setup, - user_data, - child_pid, - standard_input, - standard_output, - standard_error, - error); -} - -/** - * g_spawn_command_line_sync: - * @command_line: a command line - * @standard_output: return location for child output - * @standard_error: return location for child errors - * @exit_status: return location for child exit status - * @error: return location for errors - * - * A simple version of g_spawn_sync() with little-used parameters - * removed, taking a command line instead of an argument vector. See - * g_spawn_sync() for full details. @command_line will be parsed by - * g_shell_parse_argv(). Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag - * is enabled. Note that %G_SPAWN_SEARCH_PATH can have security - * implications, so consider using g_spawn_sync() directly if - * appropriate. Possible errors are those from g_spawn_sync() and those - * from g_shell_parse_argv(). - * - * Return value: TRUE on success, FALSE if an error was set - **/ -gboolean -g_spawn_command_line_sync (const gchar *command_line, - gchar **standard_output, - gchar **standard_error, - gint *exit_status, - GError **error) -{ - gboolean retval; - gchar **argv = 0; - - g_return_val_if_fail (command_line != NULL, FALSE); - - if (!g_shell_parse_argv (command_line, - NULL, &argv, - error)) - return FALSE; - - retval = g_spawn_sync (NULL, - argv, - NULL, - G_SPAWN_SEARCH_PATH, - NULL, - NULL, - standard_output, - standard_error, - exit_status, - error); - g_strfreev (argv); - - return retval; -} - -/** - * g_spawn_command_line_async: - * @command_line: a command line - * @error: return location for errors - * - * A simple version of g_spawn_async() that parses a command line with - * g_shell_parse_argv() and passes it to g_spawn_async(). Runs a - * command line in the background. Unlike g_spawn_async(), the - * %G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note - * that %G_SPAWN_SEARCH_PATH can have security implications, so - * consider using g_spawn_async() directly if appropriate. Possible - * errors are those from g_shell_parse_argv() and g_spawn_async(). - * - * Return value: TRUE on success, FALSE if error is set. - **/ -gboolean -g_spawn_command_line_async (const gchar *command_line, - GError **error) -{ - gboolean retval; - gchar **argv = 0; - - g_return_val_if_fail (command_line != NULL, FALSE); - - if (!g_shell_parse_argv (command_line, - NULL, &argv, - error)) - return FALSE; - - retval = g_spawn_async (NULL, - argv, - NULL, - G_SPAWN_SEARCH_PATH, - NULL, - NULL, - NULL, - error); - g_strfreev (argv); - - return retval; -} - -static gint -exec_err_to_g_error (gint en) -{ - switch (en) - { -#ifdef EACCES - case EACCES: - return G_SPAWN_ERROR_ACCES; - break; -#endif - -#ifdef EPERM - case EPERM: - return G_SPAWN_ERROR_PERM; - break; -#endif - -#ifdef E2BIG - case E2BIG: - return G_SPAWN_ERROR_2BIG; - break; -#endif - -#ifdef ENOEXEC - case ENOEXEC: - return G_SPAWN_ERROR_NOEXEC; - break; -#endif - -#ifdef ENAMETOOLONG - case ENAMETOOLONG: - return G_SPAWN_ERROR_NAMETOOLONG; - break; -#endif - -#ifdef ENOENT - case ENOENT: - return G_SPAWN_ERROR_NOENT; - break; -#endif - -#ifdef ENOMEM - case ENOMEM: - return G_SPAWN_ERROR_NOMEM; - break; -#endif - -#ifdef ENOTDIR - case ENOTDIR: - return G_SPAWN_ERROR_NOTDIR; - break; -#endif - -#ifdef ELOOP - case ELOOP: - return G_SPAWN_ERROR_LOOP; - break; -#endif - -#ifdef ETXTBUSY - case ETXTBUSY: - return G_SPAWN_ERROR_TXTBUSY; - break; -#endif - -#ifdef EIO - case EIO: - return G_SPAWN_ERROR_IO; - break; -#endif - -#ifdef ENFILE - case ENFILE: - return G_SPAWN_ERROR_NFILE; - break; -#endif - -#ifdef EMFILE - case EMFILE: - return G_SPAWN_ERROR_MFILE; - break; -#endif - -#ifdef EINVAL - case EINVAL: - return G_SPAWN_ERROR_INVAL; - break; -#endif - -#ifdef EISDIR - case EISDIR: - return G_SPAWN_ERROR_ISDIR; - break; -#endif - -#ifdef ELIBBAD - case ELIBBAD: - return G_SPAWN_ERROR_LIBBAD; - break; -#endif - - default: - return G_SPAWN_ERROR_FAILED; - break; - } -} - -static void -write_err_and_exit (gint fd, gint msg) -{ - gint en = errno; - - write (fd, &msg, sizeof(msg)); - write (fd, &en, sizeof(en)); - - _exit (1); -} - -static void -set_cloexec (gint fd) -{ - fcntl (fd, F_SETFD, FD_CLOEXEC); -} - -static gint -sane_dup2 (gint fd1, gint fd2) -{ - gint ret; - - retry: - ret = dup2 (fd1, fd2); - if (ret < 0 && errno == EINTR) - goto retry; - - return ret; -} - -enum -{ - CHILD_CHDIR_FAILED, - CHILD_EXEC_FAILED, - CHILD_DUP2_FAILED, - CHILD_FORK_FAILED -}; - -static void -do_exec (gint child_err_report_fd, - gint stdin_fd, - gint stdout_fd, - gint stderr_fd, - const gchar *working_directory, - gchar **argv, - gchar **envp, - gboolean close_descriptors, - gboolean search_path, - gboolean stdout_to_null, - gboolean stderr_to_null, - gboolean child_inherits_stdin, - gboolean file_and_argv_zero, - GSpawnChildSetupFunc child_setup, - gpointer user_data) -{ - if (working_directory && chdir (working_directory) < 0) - write_err_and_exit (child_err_report_fd, - CHILD_CHDIR_FAILED); - - /* Close all file descriptors but stdin stdout and stderr as - * soon as we exec. Note that this includes - * child_err_report_fd, which keeps the parent from blocking - * forever on the other end of that pipe. - */ - if (close_descriptors) - { - gint open_max; - gint i; - - open_max = sysconf (_SC_OPEN_MAX); - for (i = 3; i < open_max; i++) - set_cloexec (i); - } - else - { - /* We need to do child_err_report_fd anyway */ - set_cloexec (child_err_report_fd); - } - - /* Redirect pipes as required */ - - if (stdin_fd >= 0) - { - /* dup2 can't actually fail here I don't think */ - - if (sane_dup2 (stdin_fd, 0) < 0) - write_err_and_exit (child_err_report_fd, - CHILD_DUP2_FAILED); - - /* ignore this if it doesn't work */ - close_and_invalidate (&stdin_fd); - } - else if (!child_inherits_stdin) - { - /* Keep process from blocking on a read of stdin */ - gint read_null = open ("/dev/null", O_RDONLY); - sane_dup2 (read_null, 0); - close_and_invalidate (&read_null); - } - - if (stdout_fd >= 0) - { - /* dup2 can't actually fail here I don't think */ - - if (sane_dup2 (stdout_fd, 1) < 0) - write_err_and_exit (child_err_report_fd, - CHILD_DUP2_FAILED); - - /* ignore this if it doesn't work */ - close_and_invalidate (&stdout_fd); - } - else if (stdout_to_null) - { - gint write_null = open ("/dev/null", O_WRONLY); - sane_dup2 (write_null, 1); - close_and_invalidate (&write_null); - } - - if (stderr_fd >= 0) - { - /* dup2 can't actually fail here I don't think */ - - if (sane_dup2 (stderr_fd, 2) < 0) - write_err_and_exit (child_err_report_fd, - CHILD_DUP2_FAILED); - - /* ignore this if it doesn't work */ - close_and_invalidate (&stderr_fd); - } - else if (stderr_to_null) - { - gint write_null = open ("/dev/null", O_WRONLY); - sane_dup2 (write_null, 2); - close_and_invalidate (&write_null); - } - - /* Call user function just before we exec */ - if (child_setup) - { - (* child_setup) (user_data); - } - - g_execute (argv[0], - file_and_argv_zero ? argv + 1 : argv, - envp, search_path); - - /* Exec failed */ - write_err_and_exit (child_err_report_fd, - CHILD_EXEC_FAILED); -} - -static gboolean -read_ints (int fd, - gint* buf, - gint n_ints_in_buf, - gint *n_ints_read, - GError **error) -{ - gsize bytes = 0; - - while (TRUE) - { - gssize chunk; - - if (bytes >= sizeof(gint)*2) - break; /* give up, who knows what happened, should not be - * possible. - */ - - again: - chunk = read (fd, - ((gchar*)buf) + bytes, - sizeof(gint) * n_ints_in_buf - bytes); - if (chunk < 0 && errno == EINTR) - goto again; - - if (chunk < 0) - { - /* Some weird shit happened, bail out */ - - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FAILED, - _("Failed to read from child pipe (%s)"), - g_strerror (errno)); - - return FALSE; - } - else if (chunk == 0) - break; /* EOF */ - else /* chunk > 0 */ - bytes += chunk; - } - - *n_ints_read = (gint)(bytes / sizeof(gint)); - - return TRUE; -} - -static gboolean -fork_exec_with_pipes (gboolean intermediate_child, - const gchar *working_directory, - gchar **argv, - gchar **envp, - gboolean close_descriptors, - gboolean search_path, - gboolean stdout_to_null, - gboolean stderr_to_null, - gboolean child_inherits_stdin, - gboolean file_and_argv_zero, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *child_pid, - gint *standard_input, - gint *standard_output, - gint *standard_error, - GError **error) -{ - gint pid; - gint stdin_pipe[2] = { -1, -1 }; - gint stdout_pipe[2] = { -1, -1 }; - gint stderr_pipe[2] = { -1, -1 }; - gint child_err_report_pipe[2] = { -1, -1 }; - gint child_pid_report_pipe[2] = { -1, -1 }; - gint status; - - if (!make_pipe (child_err_report_pipe, error)) - return FALSE; - - if (intermediate_child && !make_pipe (child_pid_report_pipe, error)) - goto cleanup_and_fail; - - if (standard_input && !make_pipe (stdin_pipe, error)) - goto cleanup_and_fail; - - if (standard_output && !make_pipe (stdout_pipe, error)) - goto cleanup_and_fail; - - if (standard_error && !make_pipe (stderr_pipe, error)) - goto cleanup_and_fail; - - pid = fork (); - - if (pid < 0) - { - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FORK, - _("Failed to fork (%s)"), - g_strerror (errno)); - - goto cleanup_and_fail; - } - else if (pid == 0) - { - /* Immediate child. This may or may not be the child that - * actually execs the new process. - */ - - /* Be sure we crash if the parent exits - * and we write to the err_report_pipe - */ - signal (SIGPIPE, SIG_DFL); - - /* Close the parent's end of the pipes; - * not needed in the close_descriptors case, - * though - */ - close_and_invalidate (&child_err_report_pipe[0]); - close_and_invalidate (&child_pid_report_pipe[0]); - close_and_invalidate (&stdin_pipe[1]); - close_and_invalidate (&stdout_pipe[0]); - close_and_invalidate (&stderr_pipe[0]); - - if (intermediate_child) - { - /* We need to fork an intermediate child that launches the - * final child. The purpose of the intermediate child - * is to exit, so we can waitpid() it immediately. - * Then the grandchild will not become a zombie. - */ - gint grandchild_pid; - - grandchild_pid = fork (); - - if (grandchild_pid < 0) - { - /* report -1 as child PID */ - write (child_pid_report_pipe[1], &grandchild_pid, - sizeof(grandchild_pid)); - - write_err_and_exit (child_err_report_pipe[1], - CHILD_FORK_FAILED); - } - else if (grandchild_pid == 0) - { - do_exec (child_err_report_pipe[1], - stdin_pipe[0], - stdout_pipe[1], - stderr_pipe[1], - working_directory, - argv, - envp, - close_descriptors, - search_path, - stdout_to_null, - stderr_to_null, - child_inherits_stdin, - file_and_argv_zero, - child_setup, - user_data); - } - else - { - write (child_pid_report_pipe[1], &grandchild_pid, sizeof(grandchild_pid)); - close_and_invalidate (&child_pid_report_pipe[1]); - - _exit (0); - } - } - else - { - /* Just run the child. - */ - - do_exec (child_err_report_pipe[1], - stdin_pipe[0], - stdout_pipe[1], - stderr_pipe[1], - working_directory, - argv, - envp, - close_descriptors, - search_path, - stdout_to_null, - stderr_to_null, - child_inherits_stdin, - file_and_argv_zero, - child_setup, - user_data); - } - } - else - { - /* Parent */ - - gint buf[2]; - gint n_ints = 0; - - /* Close the uncared-about ends of the pipes */ - close_and_invalidate (&child_err_report_pipe[1]); - close_and_invalidate (&child_pid_report_pipe[1]); - close_and_invalidate (&stdin_pipe[0]); - close_and_invalidate (&stdout_pipe[1]); - close_and_invalidate (&stderr_pipe[1]); - - /* If we had an intermediate child, reap it */ - if (intermediate_child) - { - wait_again: - if (waitpid (pid, &status, 0) < 0) - { - if (errno == EINTR) - goto wait_again; - else if (errno == ECHILD) - ; /* do nothing, child already reaped */ - else - g_warning ("waitpid() should not fail in " - "'fork_exec_with_pipes'"); - } - } - - - if (!read_ints (child_err_report_pipe[0], - buf, 2, &n_ints, - error)) - goto cleanup_and_fail; - - if (n_ints >= 2) - { - /* Error from the child. */ - - switch (buf[0]) - { - case CHILD_CHDIR_FAILED: - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_CHDIR, - _("Failed to change to directory '%s' (%s)"), - working_directory, - g_strerror (buf[1])); - - break; - - case CHILD_EXEC_FAILED: - g_set_error (error, - G_SPAWN_ERROR, - exec_err_to_g_error (buf[1]), - _("Failed to execute child process (%s)"), - g_strerror (buf[1])); - - break; - - case CHILD_DUP2_FAILED: - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FAILED, - _("Failed to redirect output or input of child process (%s)"), - g_strerror (buf[1])); - - break; - - case CHILD_FORK_FAILED: - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FORK, - _("Failed to fork child process (%s)"), - g_strerror (buf[1])); - break; - - default: - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FAILED, - _("Unknown error executing child process")); - break; - } - - goto cleanup_and_fail; - } - - /* Get child pid from intermediate child pipe. */ - if (intermediate_child) - { - n_ints = 0; - - if (!read_ints (child_pid_report_pipe[0], - buf, 1, &n_ints, error)) - goto cleanup_and_fail; - - if (n_ints < 1) - { - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FAILED, - _("Failed to read enough data from child pid pipe (%s)"), - g_strerror (errno)); - goto cleanup_and_fail; - } - else - { - /* we have the child pid */ - pid = buf[0]; - } - } - - /* Success against all odds! return the information */ - - if (child_pid) - *child_pid = pid; - - if (standard_input) - *standard_input = stdin_pipe[1]; - if (standard_output) - *standard_output = stdout_pipe[0]; - if (standard_error) - *standard_error = stderr_pipe[0]; - - return TRUE; - } - - cleanup_and_fail: - close_and_invalidate (&child_err_report_pipe[0]); - close_and_invalidate (&child_err_report_pipe[1]); - close_and_invalidate (&child_pid_report_pipe[0]); - close_and_invalidate (&child_pid_report_pipe[1]); - close_and_invalidate (&stdin_pipe[0]); - close_and_invalidate (&stdin_pipe[1]); - close_and_invalidate (&stdout_pipe[0]); - close_and_invalidate (&stdout_pipe[1]); - close_and_invalidate (&stderr_pipe[0]); - close_and_invalidate (&stderr_pipe[1]); - - return FALSE; -} - -static gboolean -make_pipe (gint p[2], - GError **error) -{ - if (pipe (p) < 0) - { - g_set_error (error, - G_SPAWN_ERROR, - G_SPAWN_ERROR_FAILED, - _("Failed to create pipe for communicating with child process (%s)"), - g_strerror (errno)); - return FALSE; - } - else - return TRUE; -} - -/* Based on execvp from GNU C Library */ - -static void -script_execute (const gchar *file, - gchar **argv, - gchar **envp, - gboolean search_path) -{ - /* Count the arguments. */ - int argc = 0; - while (argv[argc]) - ++argc; - - /* Construct an argument list for the shell. */ - { - gchar **new_argv; - - new_argv = g_new0 (gchar*, argc + 1); - - new_argv[0] = (char *) "/bin/sh"; - new_argv[1] = (char *) file; - while (argc > 1) - { - new_argv[argc] = argv[argc - 1]; - --argc; - } - - /* Execute the shell. */ - if (envp) - execve (new_argv[0], new_argv, envp); - else - execv (new_argv[0], new_argv); - - g_free (new_argv); - } -} - -static gchar* -my_strchrnul (const gchar *str, gchar c) -{ - gchar *p = (gchar*) str; - while (*p && (*p != c)) - ++p; - - return p; -} - -static gint -g_execute (const gchar *file, - gchar **argv, - gchar **envp, - gboolean search_path) -{ - if (*file == '\0') - { - /* We check the simple case first. */ - errno = ENOENT; - return -1; - } - - if (!search_path || strchr (file, '/') != NULL) - { - /* Don't search when it contains a slash. */ - if (envp) - execve (file, argv, envp); - else - execv (file, argv); - - if (errno == ENOEXEC) - script_execute (file, argv, envp, FALSE); - } - else - { - gboolean got_eacces = 0; - const gchar *path, *p; - gchar *name, *freeme; - size_t len; - size_t pathlen; - - path = g_getenv ("PATH"); - if (path == NULL) - { - /* There is no `PATH' in the environment. The default - * search path in libc is the current directory followed by - * the path `confstr' returns for `_CS_PATH'. - */ - - /* In GLib we put . last, for security, and don't use the - * unportable confstr(); UNIX98 does not actually specify - * what to search if PATH is unset. POSIX may, dunno. - */ - - path = "/bin:/usr/bin:."; - } - - len = strlen (file) + 1; - pathlen = strlen (path); - freeme = name = g_malloc (pathlen + len + 1); - - /* Copy the file name at the top, including '\0' */ - memcpy (name + pathlen + 1, file, len); - name = name + pathlen; - /* And add the slash before the filename */ - *name = '/'; - - p = path; - do - { - char *startp; - - path = p; - p = my_strchrnul (path, ':'); - - if (p == path) - /* Two adjacent colons, or a colon at the beginning or the end - * of `PATH' means to search the current directory. - */ - startp = name + 1; - else - startp = memcpy (name - (p - path), path, p - path); - - /* Try to execute this name. If it works, execv will not return. */ - if (envp) - execve (startp, argv, envp); - else - execv (startp, argv); - - if (errno == ENOEXEC) - script_execute (startp, argv, envp, search_path); - - switch (errno) - { - case EACCES: - /* Record the we got a `Permission denied' error. If we end - * up finding no executable we can use, we want to diagnose - * that we did find one but were denied access. - */ - got_eacces = TRUE; - - /* FALL THRU */ - - case ENOENT: -#ifdef ESTALE - case ESTALE: -#endif -#ifdef ENOTDIR - case ENOTDIR: -#endif - /* Those errors indicate the file is missing or not executable - * by us, in which case we want to just try the next path - * directory. - */ - break; - - default: - /* Some other error means we found an executable file, but - * something went wrong executing it; return the error to our - * caller. - */ - g_free (freeme); - return -1; - } - } - while (*p++ != '\0'); - - /* We tried every element and none of them worked. */ - if (got_eacces) - /* At least one failure was due to permissions, so report that - * error. - */ - errno = EACCES; - - g_free (freeme); - } - - /* Return the error from the last attempt (probably ENOENT). */ - return -1; -} diff --git a/gspawn.h b/gspawn.h deleted file mode 100644 index dcebc3a8b..000000000 --- a/gspawn.h +++ /dev/null @@ -1,128 +0,0 @@ -/* gspawn.h - Process launching - * - * Copyright 2000 Red Hat, Inc. - * - * GLib is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * GLib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GLib; see the file COPYING.LIB. If not, write - * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __G_SPAWN_H__ -#define __G_SPAWN_H__ - -#include <gerror.h> - -G_BEGIN_DECLS - -/* I'm not sure I remember our proposed naming convention here. */ -#define G_SPAWN_ERROR g_spawn_error_quark () - -typedef enum -{ - G_SPAWN_ERROR_FORK, /* fork failed due to lack of memory */ - G_SPAWN_ERROR_READ, /* read or select on pipes failed */ - G_SPAWN_ERROR_CHDIR, /* changing to working dir failed */ - G_SPAWN_ERROR_ACCES, /* execv() returned EACCES */ - G_SPAWN_ERROR_PERM, /* execv() returned EPERM */ - G_SPAWN_ERROR_2BIG, /* execv() returned E2BIG */ - G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */ - G_SPAWN_ERROR_NAMETOOLONG, /* "" "" ENAMETOOLONG */ - G_SPAWN_ERROR_NOENT, /* "" "" ENOENT */ - G_SPAWN_ERROR_NOMEM, /* "" "" ENOMEM */ - G_SPAWN_ERROR_NOTDIR, /* "" "" ENOTDIR */ - G_SPAWN_ERROR_LOOP, /* "" "" ELOOP */ - G_SPAWN_ERROR_TXTBUSY, /* "" "" ETXTBUSY */ - G_SPAWN_ERROR_IO, /* "" "" EIO */ - G_SPAWN_ERROR_NFILE, /* "" "" ENFILE */ - G_SPAWN_ERROR_MFILE, /* "" "" EMFLE */ - G_SPAWN_ERROR_INVAL, /* "" "" EINVAL */ - G_SPAWN_ERROR_ISDIR, /* "" "" EISDIR */ - G_SPAWN_ERROR_LIBBAD, /* "" "" ELIBBAD */ - G_SPAWN_ERROR_FAILED /* other fatal failure, error->message - * should explain - */ -} GSpawnError; - -typedef void (* GSpawnChildSetupFunc) (gpointer user_data); - -typedef enum -{ - G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0, - G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1, - /* look for argv[0] in the path i.e. use execvp() */ - G_SPAWN_SEARCH_PATH = 1 << 2, - /* Dump output to /dev/null */ - G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, - G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, - G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, - G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6 -} GSpawnFlags; - -GQuark g_spawn_error_quark (void); - -gboolean g_spawn_async (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *child_pid, - GError **error); - - -/* Opens pipes for non-NULL standard_output, standard_input, standard_error, - * and returns the parent's end of the pipes. - */ -gboolean g_spawn_async_with_pipes (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gint *child_pid, - gint *standard_input, - gint *standard_output, - gint *standard_error, - GError **error); - - -/* If standard_output or standard_error are non-NULL, the full - * standard output or error of the command will be placed there. - */ - -gboolean g_spawn_sync (const gchar *working_directory, - gchar **argv, - gchar **envp, - GSpawnFlags flags, - GSpawnChildSetupFunc child_setup, - gpointer user_data, - gchar **standard_output, - gchar **standard_error, - gint *exit_status, - GError **error); - -gboolean g_spawn_command_line_sync (const gchar *command_line, - gchar **standard_output, - gchar **standard_error, - gint *exit_status, - GError **error); -gboolean g_spawn_command_line_async (const gchar *command_line, - GError **error); - - -G_END_DECLS - -#endif /* __G_SPAWN_H__ */ - - diff --git a/gstrfuncs.c b/gstrfuncs.c deleted file mode 100644 index f570fc70a..000000000 --- a/gstrfuncs.c +++ /dev/null @@ -1,1660 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#define _GNU_SOURCE /* For stpcpy */ - -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <locale.h> -#include <ctype.h> /* For tolower() */ -#if !defined (HAVE_STRSIGNAL) || !defined(NO_SYS_SIGLIST_DECL) -#include <signal.h> -#endif -#include "glib.h" - -#ifdef G_OS_WIN32 -#include <windows.h> -#endif - -/* do not include <unistd.h> in this place since it - * inteferes with g_strsignal() on some OSes - */ - -gchar* -g_strdup (const gchar *str) -{ - gchar *new_str; - - if (str) - { - new_str = g_new (char, strlen (str) + 1); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -gpointer -g_memdup (gconstpointer mem, - guint byte_size) -{ - gpointer new_mem; - - if (mem) - { - new_mem = g_malloc (byte_size); - memcpy (new_mem, mem, byte_size); - } - else - new_mem = NULL; - - return new_mem; -} - -gchar* -g_strndup (const gchar *str, - gsize n) -{ - gchar *new_str; - - if (str) - { - new_str = g_new (gchar, n + 1); - strncpy (new_str, str, n); - new_str[n] = '\0'; - } - else - new_str = NULL; - - return new_str; -} - -gchar* -g_strnfill (gsize length, - gchar fill_char) -{ - register gchar *str, *s, *end; - - str = g_new (gchar, length + 1); - s = str; - end = str + length; - while (s < end) - *(s++) = fill_char; - *s = 0; - - return str; -} - -/** - * g_stpcpy: - * @dest: destination buffer - * @src: source string - * - * Copies a nul-terminated string into the dest buffer, include the - * trailing nul, and return a pointer to the trailing nul byte. - * This is useful for concatenating multiple strings together - * without having to repeatedly scan for the end. - * - * Return value: a pointer to trailing nul byte. - **/ -gchar * -g_stpcpy (gchar *dest, - const gchar *src) -{ -#ifdef HAVE_STPCPY - g_return_val_if_fail (dest != NULL, NULL); - g_return_val_if_fail (src != NULL, NULL); - return stpcpy (dest, src); -#else - register gchar *d = dest; - register const gchar *s = src; - - g_return_val_if_fail (dest != NULL, NULL); - g_return_val_if_fail (src != NULL, NULL); - do - *d++ = *s; - while (*s++ != '\0'); - - return d - 1; -#endif -} - -gchar* -g_strdup_vprintf (const gchar *format, - va_list args1) -{ - gchar *buffer; - va_list args2; - - G_VA_COPY (args2, args1); - - buffer = g_new (gchar, g_printf_string_upper_bound (format, args1)); - - vsprintf (buffer, format, args2); - va_end (args2); - - return buffer; -} - -gchar* -g_strdup_printf (const gchar *format, - ...) -{ - gchar *buffer; - va_list args; - - va_start (args, format); - buffer = g_strdup_vprintf (format, args); - va_end (args); - - return buffer; -} - -gchar* -g_strconcat (const gchar *string1, ...) -{ - gsize l; - va_list args; - gchar *s; - gchar *concat; - gchar *ptr; - - g_return_val_if_fail (string1 != NULL, NULL); - - l = 1 + strlen (string1); - va_start (args, string1); - s = va_arg (args, gchar*); - while (s) - { - l += strlen (s); - s = va_arg (args, gchar*); - } - va_end (args); - - concat = g_new (gchar, l); - ptr = concat; - - ptr = g_stpcpy (ptr, string1); - va_start (args, string1); - s = va_arg (args, gchar*); - while (s) - { - ptr = g_stpcpy (ptr, s); - s = va_arg (args, gchar*); - } - va_end (args); - - return concat; -} - -gdouble -g_strtod (const gchar *nptr, - gchar **endptr) -{ - gchar *fail_pos_1; - gchar *fail_pos_2; - gdouble val_1; - gdouble val_2 = 0; - - g_return_val_if_fail (nptr != NULL, 0); - - fail_pos_1 = NULL; - fail_pos_2 = NULL; - - val_1 = strtod (nptr, &fail_pos_1); - - if (fail_pos_1 && fail_pos_1[0] != 0) - { - gchar *old_locale; - - old_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - val_2 = strtod (nptr, &fail_pos_2); - setlocale (LC_NUMERIC, old_locale); - g_free (old_locale); - } - - if (!fail_pos_1 || fail_pos_1[0] == 0 || fail_pos_1 >= fail_pos_2) - { - if (endptr) - *endptr = fail_pos_1; - return val_1; - } - else - { - if (endptr) - *endptr = fail_pos_2; - return val_2; - } -} - -G_CONST_RETURN gchar* -g_strerror (gint errnum) -{ - static GStaticPrivate msg_private = G_STATIC_PRIVATE_INIT; - char *msg; - -#ifdef HAVE_STRERROR - return strerror (errnum); -#elif NO_SYS_ERRLIST - switch (errnum) - { -#ifdef E2BIG - case E2BIG: return "argument list too long"; -#endif -#ifdef EACCES - case EACCES: return "permission denied"; -#endif -#ifdef EADDRINUSE - case EADDRINUSE: return "address already in use"; -#endif -#ifdef EADDRNOTAVAIL - case EADDRNOTAVAIL: return "can't assign requested address"; -#endif -#ifdef EADV - case EADV: return "advertise error"; -#endif -#ifdef EAFNOSUPPORT - case EAFNOSUPPORT: return "address family not supported by protocol family"; -#endif -#ifdef EAGAIN - case EAGAIN: return "try again"; -#endif -#ifdef EALIGN - case EALIGN: return "EALIGN"; -#endif -#ifdef EALREADY - case EALREADY: return "operation already in progress"; -#endif -#ifdef EBADE - case EBADE: return "bad exchange descriptor"; -#endif -#ifdef EBADF - case EBADF: return "bad file number"; -#endif -#ifdef EBADFD - case EBADFD: return "file descriptor in bad state"; -#endif -#ifdef EBADMSG - case EBADMSG: return "not a data message"; -#endif -#ifdef EBADR - case EBADR: return "bad request descriptor"; -#endif -#ifdef EBADRPC - case EBADRPC: return "RPC structure is bad"; -#endif -#ifdef EBADRQC - case EBADRQC: return "bad request code"; -#endif -#ifdef EBADSLT - case EBADSLT: return "invalid slot"; -#endif -#ifdef EBFONT - case EBFONT: return "bad font file format"; -#endif -#ifdef EBUSY - case EBUSY: return "mount device busy"; -#endif -#ifdef ECHILD - case ECHILD: return "no children"; -#endif -#ifdef ECHRNG - case ECHRNG: return "channel number out of range"; -#endif -#ifdef ECOMM - case ECOMM: return "communication error on send"; -#endif -#ifdef ECONNABORTED - case ECONNABORTED: return "software caused connection abort"; -#endif -#ifdef ECONNREFUSED - case ECONNREFUSED: return "connection refused"; -#endif -#ifdef ECONNRESET - case ECONNRESET: return "connection reset by peer"; -#endif -#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK)) - case EDEADLK: return "resource deadlock avoided"; -#endif -#ifdef EDEADLOCK - case EDEADLOCK: return "resource deadlock avoided"; -#endif -#ifdef EDESTADDRREQ - case EDESTADDRREQ: return "destination address required"; -#endif -#ifdef EDIRTY - case EDIRTY: return "mounting a dirty fs w/o force"; -#endif -#ifdef EDOM - case EDOM: return "math argument out of range"; -#endif -#ifdef EDOTDOT - case EDOTDOT: return "cross mount point"; -#endif -#ifdef EDQUOT - case EDQUOT: return "disk quota exceeded"; -#endif -#ifdef EDUPPKG - case EDUPPKG: return "duplicate package name"; -#endif -#ifdef EEXIST - case EEXIST: return "file already exists"; -#endif -#ifdef EFAULT - case EFAULT: return "bad address in system call argument"; -#endif -#ifdef EFBIG - case EFBIG: return "file too large"; -#endif -#ifdef EHOSTDOWN - case EHOSTDOWN: return "host is down"; -#endif -#ifdef EHOSTUNREACH - case EHOSTUNREACH: return "host is unreachable"; -#endif -#ifdef EIDRM - case EIDRM: return "identifier removed"; -#endif -#ifdef EINIT - case EINIT: return "initialization error"; -#endif -#ifdef EINPROGRESS - case EINPROGRESS: return "operation now in progress"; -#endif -#ifdef EINTR - case EINTR: return "interrupted system call"; -#endif -#ifdef EINVAL - case EINVAL: return "invalid argument"; -#endif -#ifdef EIO - case EIO: return "I/O error"; -#endif -#ifdef EISCONN - case EISCONN: return "socket is already connected"; -#endif -#ifdef EISDIR - case EISDIR: return "illegal operation on a directory"; -#endif -#ifdef EISNAME - case EISNAM: return "is a name file"; -#endif -#ifdef ELBIN - case ELBIN: return "ELBIN"; -#endif -#ifdef EL2HLT - case EL2HLT: return "level 2 halted"; -#endif -#ifdef EL2NSYNC - case EL2NSYNC: return "level 2 not synchronized"; -#endif -#ifdef EL3HLT - case EL3HLT: return "level 3 halted"; -#endif -#ifdef EL3RST - case EL3RST: return "level 3 reset"; -#endif -#ifdef ELIBACC - case ELIBACC: return "can not access a needed shared library"; -#endif -#ifdef ELIBBAD - case ELIBBAD: return "accessing a corrupted shared library"; -#endif -#ifdef ELIBEXEC - case ELIBEXEC: return "can not exec a shared library directly"; -#endif -#ifdef ELIBMAX - case ELIBMAX: return "attempting to link in more shared libraries than system limit"; -#endif -#ifdef ELIBSCN - case ELIBSCN: return ".lib section in a.out corrupted"; -#endif -#ifdef ELNRNG - case ELNRNG: return "link number out of range"; -#endif -#ifdef ELOOP - case ELOOP: return "too many levels of symbolic links"; -#endif -#ifdef EMFILE - case EMFILE: return "too many open files"; -#endif -#ifdef EMLINK - case EMLINK: return "too many links"; -#endif -#ifdef EMSGSIZE - case EMSGSIZE: return "message too long"; -#endif -#ifdef EMULTIHOP - case EMULTIHOP: return "multihop attempted"; -#endif -#ifdef ENAMETOOLONG - case ENAMETOOLONG: return "file name too long"; -#endif -#ifdef ENAVAIL - case ENAVAIL: return "not available"; -#endif -#ifdef ENET - case ENET: return "ENET"; -#endif -#ifdef ENETDOWN - case ENETDOWN: return "network is down"; -#endif -#ifdef ENETRESET - case ENETRESET: return "network dropped connection on reset"; -#endif -#ifdef ENETUNREACH - case ENETUNREACH: return "network is unreachable"; -#endif -#ifdef ENFILE - case ENFILE: return "file table overflow"; -#endif -#ifdef ENOANO - case ENOANO: return "anode table overflow"; -#endif -#if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR)) - case ENOBUFS: return "no buffer space available"; -#endif -#ifdef ENOCSI - case ENOCSI: return "no CSI structure available"; -#endif -#ifdef ENODATA - case ENODATA: return "no data available"; -#endif -#ifdef ENODEV - case ENODEV: return "no such device"; -#endif -#ifdef ENOENT - case ENOENT: return "no such file or directory"; -#endif -#ifdef ENOEXEC - case ENOEXEC: return "exec format error"; -#endif -#ifdef ENOLCK - case ENOLCK: return "no locks available"; -#endif -#ifdef ENOLINK - case ENOLINK: return "link has be severed"; -#endif -#ifdef ENOMEM - case ENOMEM: return "not enough memory"; -#endif -#ifdef ENOMSG - case ENOMSG: return "no message of desired type"; -#endif -#ifdef ENONET - case ENONET: return "machine is not on the network"; -#endif -#ifdef ENOPKG - case ENOPKG: return "package not installed"; -#endif -#ifdef ENOPROTOOPT - case ENOPROTOOPT: return "bad proocol option"; -#endif -#ifdef ENOSPC - case ENOSPC: return "no space left on device"; -#endif -#ifdef ENOSR - case ENOSR: return "out of stream resources"; -#endif -#ifdef ENOSTR - case ENOSTR: return "not a stream device"; -#endif -#ifdef ENOSYM - case ENOSYM: return "unresolved symbol name"; -#endif -#ifdef ENOSYS - case ENOSYS: return "function not implemented"; -#endif -#ifdef ENOTBLK - case ENOTBLK: return "block device required"; -#endif -#ifdef ENOTCONN - case ENOTCONN: return "socket is not connected"; -#endif -#ifdef ENOTDIR - case ENOTDIR: return "not a directory"; -#endif -#ifdef ENOTEMPTY - case ENOTEMPTY: return "directory not empty"; -#endif -#ifdef ENOTNAM - case ENOTNAM: return "not a name file"; -#endif -#ifdef ENOTSOCK - case ENOTSOCK: return "socket operation on non-socket"; -#endif -#ifdef ENOTTY - case ENOTTY: return "inappropriate device for ioctl"; -#endif -#ifdef ENOTUNIQ - case ENOTUNIQ: return "name not unique on network"; -#endif -#ifdef ENXIO - case ENXIO: return "no such device or address"; -#endif -#ifdef EOPNOTSUPP - case EOPNOTSUPP: return "operation not supported on socket"; -#endif -#ifdef EPERM - case EPERM: return "not owner"; -#endif -#ifdef EPFNOSUPPORT - case EPFNOSUPPORT: return "protocol family not supported"; -#endif -#ifdef EPIPE - case EPIPE: return "broken pipe"; -#endif -#ifdef EPROCLIM - case EPROCLIM: return "too many processes"; -#endif -#ifdef EPROCUNAVAIL - case EPROCUNAVAIL: return "bad procedure for program"; -#endif -#ifdef EPROGMISMATCH - case EPROGMISMATCH: return "program version wrong"; -#endif -#ifdef EPROGUNAVAIL - case EPROGUNAVAIL: return "RPC program not available"; -#endif -#ifdef EPROTO - case EPROTO: return "protocol error"; -#endif -#ifdef EPROTONOSUPPORT - case EPROTONOSUPPORT: return "protocol not suppored"; -#endif -#ifdef EPROTOTYPE - case EPROTOTYPE: return "protocol wrong type for socket"; -#endif -#ifdef ERANGE - case ERANGE: return "math result unrepresentable"; -#endif -#if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED)) - case EREFUSED: return "EREFUSED"; -#endif -#ifdef EREMCHG - case EREMCHG: return "remote address changed"; -#endif -#ifdef EREMDEV - case EREMDEV: return "remote device"; -#endif -#ifdef EREMOTE - case EREMOTE: return "pathname hit remote file system"; -#endif -#ifdef EREMOTEIO - case EREMOTEIO: return "remote i/o error"; -#endif -#ifdef EREMOTERELEASE - case EREMOTERELEASE: return "EREMOTERELEASE"; -#endif -#ifdef EROFS - case EROFS: return "read-only file system"; -#endif -#ifdef ERPCMISMATCH - case ERPCMISMATCH: return "RPC version is wrong"; -#endif -#ifdef ERREMOTE - case ERREMOTE: return "object is remote"; -#endif -#ifdef ESHUTDOWN - case ESHUTDOWN: return "can't send afer socket shutdown"; -#endif -#ifdef ESOCKTNOSUPPORT - case ESOCKTNOSUPPORT: return "socket type not supported"; -#endif -#ifdef ESPIPE - case ESPIPE: return "invalid seek"; -#endif -#ifdef ESRCH - case ESRCH: return "no such process"; -#endif -#ifdef ESRMNT - case ESRMNT: return "srmount error"; -#endif -#ifdef ESTALE - case ESTALE: return "stale remote file handle"; -#endif -#ifdef ESUCCESS - case ESUCCESS: return "Error 0"; -#endif -#ifdef ETIME - case ETIME: return "timer expired"; -#endif -#ifdef ETIMEDOUT - case ETIMEDOUT: return "connection timed out"; -#endif -#ifdef ETOOMANYREFS - case ETOOMANYREFS: return "too many references: can't splice"; -#endif -#ifdef ETXTBSY - case ETXTBSY: return "text file or pseudo-device busy"; -#endif -#ifdef EUCLEAN - case EUCLEAN: return "structure needs cleaning"; -#endif -#ifdef EUNATCH - case EUNATCH: return "protocol driver not attached"; -#endif -#ifdef EUSERS - case EUSERS: return "too many users"; -#endif -#ifdef EVERSION - case EVERSION: return "version mismatch"; -#endif -#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) - case EWOULDBLOCK: return "operation would block"; -#endif -#ifdef EXDEV - case EXDEV: return "cross-domain link"; -#endif -#ifdef EXFULL - case EXFULL: return "message tables full"; -#endif - } -#else /* NO_SYS_ERRLIST */ - extern int sys_nerr; - extern char *sys_errlist[]; - - if ((errnum > 0) && (errnum <= sys_nerr)) - return sys_errlist [errnum]; -#endif /* NO_SYS_ERRLIST */ - - msg = g_static_private_get (&msg_private); - if (!msg) - { - msg = g_new (gchar, 64); - g_static_private_set (&msg_private, msg, g_free); - } - - sprintf (msg, "unknown error (%d)", errnum); - - return msg; -} - -G_CONST_RETURN gchar* -g_strsignal (gint signum) -{ - static GStaticPrivate msg_private = G_STATIC_PRIVATE_INIT; - char *msg; - -#ifdef HAVE_STRSIGNAL -#if defined(G_OS_BEOS) || defined(G_WITH_CYGWIN) -extern const char *strsignal(int); -#else - /* this is declared differently (const) in string.h on BeOS */ - extern char *strsignal (int sig); -#endif /* !G_OS_BEOS && !G_WITH_CYGWIN */ - return strsignal (signum); -#elif NO_SYS_SIGLIST - switch (signum) - { -#ifdef SIGHUP - case SIGHUP: return "Hangup"; -#endif -#ifdef SIGINT - case SIGINT: return "Interrupt"; -#endif -#ifdef SIGQUIT - case SIGQUIT: return "Quit"; -#endif -#ifdef SIGILL - case SIGILL: return "Illegal instruction"; -#endif -#ifdef SIGTRAP - case SIGTRAP: return "Trace/breakpoint trap"; -#endif -#ifdef SIGABRT - case SIGABRT: return "IOT trap/Abort"; -#endif -#ifdef SIGBUS - case SIGBUS: return "Bus error"; -#endif -#ifdef SIGFPE - case SIGFPE: return "Floating point exception"; -#endif -#ifdef SIGKILL - case SIGKILL: return "Killed"; -#endif -#ifdef SIGUSR1 - case SIGUSR1: return "User defined signal 1"; -#endif -#ifdef SIGSEGV - case SIGSEGV: return "Segmentation fault"; -#endif -#ifdef SIGUSR2 - case SIGUSR2: return "User defined signal 2"; -#endif -#ifdef SIGPIPE - case SIGPIPE: return "Broken pipe"; -#endif -#ifdef SIGALRM - case SIGALRM: return "Alarm clock"; -#endif -#ifdef SIGTERM - case SIGTERM: return "Terminated"; -#endif -#ifdef SIGSTKFLT - case SIGSTKFLT: return "Stack fault"; -#endif -#ifdef SIGCHLD - case SIGCHLD: return "Child exited"; -#endif -#ifdef SIGCONT - case SIGCONT: return "Continued"; -#endif -#ifdef SIGSTOP - case SIGSTOP: return "Stopped (signal)"; -#endif -#ifdef SIGTSTP - case SIGTSTP: return "Stopped"; -#endif -#ifdef SIGTTIN - case SIGTTIN: return "Stopped (tty input)"; -#endif -#ifdef SIGTTOU - case SIGTTOU: return "Stopped (tty output)"; -#endif -#ifdef SIGURG - case SIGURG: return "Urgent condition"; -#endif -#ifdef SIGXCPU - case SIGXCPU: return "CPU time limit exceeded"; -#endif -#ifdef SIGXFSZ - case SIGXFSZ: return "File size limit exceeded"; -#endif -#ifdef SIGVTALRM - case SIGVTALRM: return "Virtual time alarm"; -#endif -#ifdef SIGPROF - case SIGPROF: return "Profile signal"; -#endif -#ifdef SIGWINCH - case SIGWINCH: return "Window size changed"; -#endif -#ifdef SIGIO - case SIGIO: return "Possible I/O"; -#endif -#ifdef SIGPWR - case SIGPWR: return "Power failure"; -#endif -#ifdef SIGUNUSED - case SIGUNUSED: return "Unused signal"; -#endif - } -#else /* NO_SYS_SIGLIST */ - -#ifdef NO_SYS_SIGLIST_DECL - extern char *sys_siglist[]; /*(see Tue Jan 19 00:44:24 1999 in changelog)*/ -#endif - - return (char*) /* this function should return const --josh */ sys_siglist [signum]; -#endif /* NO_SYS_SIGLIST */ - - msg = g_static_private_get (&msg_private); - if (!msg) - { - msg = g_new (gchar, 64); - g_static_private_set (&msg_private, msg, g_free); - } - - sprintf (msg, "unknown signal (%d)", signum); - - return msg; -} - -/* Functions g_strlcpy and g_strlcat were originally developed by - * Todd C. Miller <Todd.Miller@courtesan.com> to simplify writing secure code. - * See ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.3 - * for more information. - */ - -#ifdef HAVE_STRLCPY -/* Use the native ones, if available; they might be implemented in assembly */ -gsize -g_strlcpy (gchar *dest, - const gchar *src, - gsize dest_size) -{ - g_return_val_if_fail (dest != NULL, 0); - g_return_val_if_fail (src != NULL, 0); - - return strlcpy (dest, src, dest_size); -} - -gsize -g_strlcat (gchar *dest, - const gchar *src, - gsize dest_size) -{ - g_return_val_if_fail (dest != NULL, 0); - g_return_val_if_fail (src != NULL, 0); - - return strlcat (dest, src, dest_size); -} - -#else /* ! HAVE_STRLCPY */ -/* g_strlcpy - * - * Copy string src to buffer dest (of buffer size dest_size). At most - * dest_size-1 characters will be copied. Always NUL terminates - * (unless dest_size == 0). This function does NOT allocate memory. - * Unlike strncpy, this function doesn't pad dest (so it's often faster). - * Returns size of attempted result, strlen(src), - * so if retval >= dest_size, truncation occurred. - */ -gsize -g_strlcpy (gchar *dest, - const gchar *src, - gsize dest_size) -{ - register gchar *d = dest; - register const gchar *s = src; - register gsize n = dest_size; - - g_return_val_if_fail (dest != NULL, 0); - g_return_val_if_fail (src != NULL, 0); - - /* Copy as many bytes as will fit */ - if (n != 0 && --n != 0) - do - { - register gchar c = *s++; - - *d++ = c; - if (c == 0) - break; - } - while (--n != 0); - - /* If not enough room in dest, add NUL and traverse rest of src */ - if (n == 0) - { - if (dest_size != 0) - *d = 0; - while (*s++) - ; - } - - return s - src - 1; /* count does not include NUL */ -} - -/* g_strlcat - * - * Appends string src to buffer dest (of buffer size dest_size). - * At most dest_size-1 characters will be copied. - * Unlike strncat, dest_size is the full size of dest, not the space left over. - * This function does NOT allocate memory. - * This always NUL terminates (unless siz == 0 or there were no NUL characters - * in the dest_size characters of dest to start with). - * Returns size of attempted result, which is - * MIN (dest_size, strlen (original dest)) + strlen (src), - * so if retval >= dest_size, truncation occurred. - */ -gsize -g_strlcat (gchar *dest, - const gchar *src, - gsize dest_size) -{ - register gchar *d = dest; - register const gchar *s = src; - register gsize bytes_left = dest_size; - gsize dlength; /* Logically, MIN (strlen (d), dest_size) */ - - g_return_val_if_fail (dest != NULL, 0); - g_return_val_if_fail (src != NULL, 0); - - /* Find the end of dst and adjust bytes left but don't go past end */ - while (*d != 0 && bytes_left-- != 0) - d++; - dlength = d - dest; - bytes_left = dest_size - dlength; - - if (bytes_left == 0) - return dlength + strlen (s); - - while (*s != 0) - { - if (bytes_left != 1) - { - *d++ = *s; - bytes_left--; - } - s++; - } - *d = 0; - - return dlength + (s - src); /* count does not include NUL */ -} -#endif /* ! HAVE_STRLCPY */ - -gchar* -g_strdown (gchar *string) -{ - register guchar *s; - - g_return_val_if_fail (string != NULL, NULL); - - s = (guchar *) string; - - while (*s) - { - if (isupper (*s)) - *s = tolower (*s); - s++; - } - - return (gchar *) string; -} - -gchar* -g_strup (gchar *string) -{ - register guchar *s; - - g_return_val_if_fail (string != NULL, NULL); - - s = (guchar *) string; - - while (*s) - { - if (islower (*s)) - *s = toupper (*s); - s++; - } - - return (gchar *) string; -} - -gchar* -g_strreverse (gchar *string) -{ - g_return_val_if_fail (string != NULL, NULL); - - if (*string) - { - register gchar *h, *t; - - h = string; - t = string + strlen (string) - 1; - - while (h < t) - { - register gchar c; - - c = *h; - *h = *t; - h++; - *t = c; - t--; - } - } - - return string; -} - -gint -g_strcasecmp (const gchar *s1, - const gchar *s2) -{ -#ifdef HAVE_STRCASECMP - g_return_val_if_fail (s1 != NULL, 0); - g_return_val_if_fail (s2 != NULL, 0); - - return strcasecmp (s1, s2); -#else - gint c1, c2; - - g_return_val_if_fail (s1 != NULL, 0); - g_return_val_if_fail (s2 != NULL, 0); - - while (*s1 && *s2) - { - /* According to A. Cox, some platforms have islower's that - * don't work right on non-uppercase - */ - c1 = isupper ((guchar)*s1) ? tolower ((guchar)*s1) : *s1; - c2 = isupper ((guchar)*s2) ? tolower ((guchar)*s2) : *s2; - if (c1 != c2) - return (c1 - c2); - s1++; s2++; - } - - return (((gint)(guchar) *s1) - ((gint)(guchar) *s2)); -#endif -} - -gint -g_strncasecmp (const gchar *s1, - const gchar *s2, - gsize n) -{ -#ifdef HAVE_STRNCASECMP - return strncasecmp (s1, s2, n); -#else - gint c1, c2; - - g_return_val_if_fail (s1 != NULL, 0); - g_return_val_if_fail (s2 != NULL, 0); - - while (n && *s1 && *s2) - { - n -= 1; - /* According to A. Cox, some platforms have islower's that - * don't work right on non-uppercase - */ - c1 = isupper ((guchar)*s1) ? tolower ((guchar)*s1) : *s1; - c2 = isupper ((guchar)*s2) ? tolower ((guchar)*s2) : *s2; - if (c1 != c2) - return (c1 - c2); - s1++; s2++; - } - - if (n) - return (((gint) (guchar) *s1) - ((gint) (guchar) *s2)); - else - return 0; -#endif -} - -gchar* -g_strdelimit (gchar *string, - const gchar *delimiters, - gchar new_delim) -{ - register gchar *c; - - g_return_val_if_fail (string != NULL, NULL); - - if (!delimiters) - delimiters = G_STR_DELIMITERS; - - for (c = string; *c; c++) - { - if (strchr (delimiters, *c)) - *c = new_delim; - } - - return string; -} - -gchar* -g_strcanon (gchar *string, - const gchar *valid_chars, - gchar substitutor) -{ - register gchar *c; - - g_return_val_if_fail (string != NULL, NULL); - g_return_val_if_fail (valid_chars != NULL, NULL); - - for (c = string; *c; c++) - { - if (!strchr (valid_chars, *c)) - *c = substitutor; - } - - return string; -} - -gchar* -g_strcompress (const gchar *source) -{ - const gchar *p = source, *octal; - gchar *dest = g_malloc (strlen (source) + 1); - gchar *q = dest; - - while (*p) - { - if (*p == '\\') - { - p++; - switch (*p) - { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': - *q = 0; - octal = p; - while ((p < octal + 3) && (*p >= '0') && (*p <= '7')) - { - *q = (*q * 8) + (*p - '0'); - p++; - } - q++; - p--; - break; - case 'b': - *q++ = '\b'; - break; - case 'f': - *q++ = '\f'; - break; - case 'n': - *q++ = '\n'; - break; - case 'r': - *q++ = '\r'; - break; - case 't': - *q++ = '\t'; - break; - default: /* Also handles \" and \\ */ - *q++ = *p; - break; - } - } - else - *q++ = *p; - p++; - } - *q = 0; - - return dest; -} - -gchar * -g_strescape (const gchar *source, - const gchar *exceptions) -{ - const guchar *p; - gchar *dest; - gchar *q; - guchar excmap[256]; - - g_return_val_if_fail (source != NULL, NULL); - - p = (guchar *) source; - /* Each source byte needs maximally four destination chars (\777) */ - q = dest = g_malloc (strlen (source) * 4 + 1); - - memset (excmap, 0, 256); - if (exceptions) - { - guchar *e = (guchar *) exceptions; - - while (*e) - { - excmap[*e] = 1; - e++; - } - } - - while (*p) - { - if (excmap[*p]) - *q++ = *p; - else - { - switch (*p) - { - case '\b': - *q++ = '\\'; - *q++ = 'b'; - break; - case '\f': - *q++ = '\\'; - *q++ = 'f'; - break; - case '\n': - *q++ = '\\'; - *q++ = 'n'; - break; - case '\r': - *q++ = '\\'; - *q++ = 'r'; - break; - case '\t': - *q++ = '\\'; - *q++ = 't'; - break; - case '\\': - *q++ = '\\'; - *q++ = '\\'; - break; - case '"': - *q++ = '\\'; - *q++ = '"'; - break; - default: - if ((*p < ' ') || (*p >= 0177)) - { - *q++ = '\\'; - *q++ = '0' + (((*p) >> 6) & 07); - *q++ = '0' + (((*p) >> 3) & 07); - *q++ = '0' + ((*p) & 07); - } - else - *q++ = *p; - break; - } - } - p++; - } - *q = 0; - return dest; -} - -gchar* -g_strchug (gchar *string) -{ - guchar *start; - - g_return_val_if_fail (string != NULL, NULL); - - for (start = (guchar*) string; *start && isspace (*start); start++) - ; - - g_memmove (string, start, strlen ((gchar *) start) + 1); - - return string; -} - -gchar* -g_strchomp (gchar *string) -{ - gchar *s; - - g_return_val_if_fail (string != NULL, NULL); - - if (!*string) - return string; - - for (s = string + strlen (string) - 1; s >= string && isspace ((guchar)*s); - s--) - *s = '\0'; - - return string; -} - -gchar** -g_strsplit (const gchar *string, - const gchar *delimiter, - gint max_tokens) -{ - GSList *string_list = NULL, *slist; - gchar **str_array, *s; - guint n = 1; - - g_return_val_if_fail (string != NULL, NULL); - g_return_val_if_fail (delimiter != NULL, NULL); - - if (max_tokens < 1) - max_tokens = G_MAXINT; - - s = strstr (string, delimiter); - if (s) - { - gsize delimiter_len = strlen (delimiter); - - do - { - gsize len; - gchar *new_string; - - len = s - string; - new_string = g_new (gchar, len + 1); - strncpy (new_string, string, len); - new_string[len] = 0; - string_list = g_slist_prepend (string_list, new_string); - n++; - string = s + delimiter_len; - s = strstr (string, delimiter); - } - while (--max_tokens && s); - } - string_list = g_slist_prepend (string_list, g_strdup (string)); - - str_array = g_new (gchar*, n + 1); - - str_array[n--] = NULL; - for (slist = string_list; slist; slist = slist->next) - str_array[n--] = slist->data; - - g_slist_free (string_list); - - return str_array; -} - -void -g_strfreev (gchar **str_array) -{ - if (str_array) - { - int i; - - for(i = 0; str_array[i] != NULL; i++) - g_free(str_array[i]); - - g_free (str_array); - } -} - -/** - * g_strdupv: - * @str_array: %NULL-terminated array of strings - * - * Copies %NULL-terminated array of strings. The copy is a deep copy; - * the new array should be freed by first freeing each string, then - * the array itself. g_strfreev() does this for you. If called - * on a %NULL value, g_strdupv() simply returns %NULL. - * - * Return value: a new %NULL-terminated array of strings - **/ -gchar** -g_strdupv (gchar **str_array) -{ - if (str_array) - { - gint i; - gchar **retval; - - i = 0; - while (str_array[i]) - ++i; - - retval = g_new (gchar*, i + 1); - - i = 0; - while (str_array[i]) - { - retval[i] = g_strdup (str_array[i]); - ++i; - } - retval[i] = NULL; - - return retval; - } - else - return NULL; -} - -gchar* -g_strjoinv (const gchar *separator, - gchar **str_array) -{ - gchar *string; - gchar *ptr; - - g_return_val_if_fail (str_array != NULL, NULL); - - if (separator == NULL) - separator = ""; - - if (*str_array) - { - gint i; - gsize len; - gsize separator_len; - - separator_len = strlen (separator); - /* First part, getting length */ - len = 1 + strlen (str_array[0]); - for (i = 1; str_array[i] != NULL; i++) - len += strlen (str_array[i]); - len += separator_len * (i - 1); - - /* Second part, building string */ - string = g_new (gchar, len); - ptr = g_stpcpy (string, *str_array); - for (i = 1; str_array[i] != NULL; i++) - { - ptr = g_stpcpy (ptr, separator); - ptr = g_stpcpy (ptr, str_array[i]); - } - } - else - string = g_strdup (""); - - return string; -} - -gchar* -g_strjoin (const gchar *separator, - ...) -{ - gchar *string, *s; - va_list args; - gsize len; - gsize separator_len; - gchar *ptr; - - if (separator == NULL) - separator = ""; - - separator_len = strlen (separator); - - va_start (args, separator); - - s = va_arg (args, gchar*); - - if (s) - { - /* First part, getting length */ - len = 1 + strlen (s); - - s = va_arg (args, gchar*); - while (s) - { - len += separator_len + strlen (s); - s = va_arg (args, gchar*); - } - va_end (args); - - /* Second part, building string */ - string = g_new (gchar, len); - - va_start (args, separator); - - s = va_arg (args, gchar*); - ptr = g_stpcpy (string, s); - - s = va_arg (args, gchar*); - while (s) - { - ptr = g_stpcpy (ptr, separator); - ptr = g_stpcpy (ptr, s); - s = va_arg (args, gchar*); - } - } - else - string = g_strdup (""); - - va_end (args); - - return string; -} - - -/** - * g_strstr_len: - * @haystack: a string - * @haystack_len: The maximum length of haystack - * @needle: The string to search for. - * - * Searches the string haystack for the first occurrence - * of the string needle, limiting the length of the search - * to haystack_len. - * - * Return value: A pointer to the found occurrence, or - * NULL if not found. - **/ -gchar * -g_strstr_len (const gchar *haystack, - gssize haystack_len, - const gchar *needle) -{ - g_return_val_if_fail (haystack != NULL, NULL); - g_return_val_if_fail (needle != NULL, NULL); - - if (haystack_len < 0) - return strstr (haystack, needle); - else - { - const gchar *p = haystack; - gsize needle_len = strlen (needle); - const gchar *end; - gsize i; - - if (needle_len == 0) - return (gchar *)haystack; - - if (haystack_len < needle_len) - return NULL; - - end = haystack + haystack_len - needle_len; - - while (*p && p <= end) - { - for (i = 0; i < needle_len; i++) - if (p[i] != needle[i]) - goto next; - - return (gchar *)p; - - next: - p++; - } - - return NULL; - } -} - -/** - * g_strrstr_len: - * @haystack: a nul-terminated string - * @needle: The nul-terminated string to search for. - * - * Searches the string haystack for the last occurrence - * of the string needle. - * - * Return value: A pointer to the found occurrence, or - * NULL if not found. - **/ -gchar * -g_strrstr (const gchar *haystack, - const gchar *needle) -{ - gsize i; - gsize needle_len; - gsize haystack_len; - const gchar *p; - - g_return_val_if_fail (haystack != NULL, NULL); - g_return_val_if_fail (needle != NULL, NULL); - - needle_len = strlen (needle); - haystack_len = strlen (haystack); - - if (needle_len == 0) - return (gchar *)haystack; - - if (haystack_len < needle_len) - return NULL; - - p = haystack + haystack_len - needle_len; - - while (p >= haystack) - { - for (i = 0; i < needle_len; i++) - if (p[i] != needle[i]) - goto next; - - return (gchar *)p; - - next: - p--; - } - - return NULL; -} - -/** - * g_strrstr_len: - * @haystack: a nul-terminated string - * @haystack_len: The maximum length of haystack - * @needle: The nul-terminated string to search for. - * - * Searches the string haystack for the last occurrence - * of the string needle, limiting the length of the search - * to haystack_len. - * - * Return value: A pointer to the found occurrence, or - * NULL if not found. - **/ -gchar * -g_strrstr_len (const gchar *haystack, - gint haystack_len, - const gchar *needle) -{ - g_return_val_if_fail (haystack != NULL, NULL); - g_return_val_if_fail (needle != NULL, NULL); - - if (haystack_len < 0) - return g_strrstr (haystack, needle); - else - { - gsize needle_len = strlen (needle); - const gchar *haystack_max = haystack + haystack_len; - const gchar *p = haystack; - gsize i; - - while (p < haystack_max && *p) - p++; - - if (p < haystack + needle_len) - return NULL; - - p -= needle_len; - - while (p >= haystack) - { - for (i = 0; i < needle_len; i++) - if (p[i] != needle[i]) - goto next; - - return (gchar *)p; - - next: - p--; - } - - return NULL; - } -} - - diff --git a/gstrfuncs.h b/gstrfuncs.h deleted file mode 100644 index 1c6ba9bda..000000000 --- a/gstrfuncs.h +++ /dev/null @@ -1,136 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_STRFUNCS_H__ -#define __G_STRFUNCS_H__ - -#include <stdarg.h> -#include <gtypes.h> - -G_BEGIN_DECLS - -/* String utility functions that modify a string argument or - * return a constant string that must not be freed. - */ -#define G_STR_DELIMITERS "_-|> <." -gchar* g_strdelimit (gchar *string, - const gchar *delimiters, - gchar new_delimiter); -gchar* g_strcanon (gchar *string, - const gchar *valid_chars, - gchar substitutor); -gdouble g_strtod (const gchar *nptr, - gchar **endptr); -G_CONST_RETURN gchar* g_strerror (gint errnum) G_GNUC_CONST; -G_CONST_RETURN gchar* g_strsignal (gint signum) G_GNUC_CONST; -gint g_strcasecmp (const gchar *s1, - const gchar *s2); -gint g_strncasecmp (const gchar *s1, - const gchar *s2, - gsize n); -gchar* g_strdown (gchar *string); -gchar* g_strup (gchar *string); -gchar* g_strreverse (gchar *string); -gsize g_strlcpy (gchar *dest, - const gchar *src, - gsize dest_size); -gsize g_strlcat (gchar *dest, - const gchar *src, - gsize dest_size); -gchar * g_strstr_len (const gchar *haystack, - gssize haystack_len, - const gchar *needle); -gchar * g_strrstr (const gchar *haystack, - const gchar *needle); -gchar * g_strrstr_len (const gchar *haystack, - gssize haystack_len, - const gchar *needle); - -/* removes leading spaces */ -gchar* g_strchug (gchar *string); -/* removes trailing spaces */ -gchar* g_strchomp (gchar *string); -/* removes leading & trailing spaces */ -#define g_strstrip( string ) g_strchomp (g_strchug (string)) - -/* String utility functions that return a newly allocated string which - * ought to be freed with g_free from the caller at some point. - */ -gchar* g_strdup (const gchar *str); -gchar* g_strdup_printf (const gchar *format, - ...) G_GNUC_PRINTF (1, 2); -gchar* g_strdup_vprintf (const gchar *format, - va_list args); -gchar* g_strndup (const gchar *str, - gsize n); -gchar* g_strnfill (gsize length, - gchar fill_char); -gchar* g_strconcat (const gchar *string1, - ...); /* NULL terminated */ -gchar* g_strjoin (const gchar *separator, - ...); /* NULL terminated */ -/* Make a copy of a string interpreting C string -style escape - * sequences. Inverse of g_strescape. The recognized sequences are \b - * \f \n \r \t \\ \" and the octal format. - */ -gchar* g_strcompress (const gchar *source); - -/* Copy a string escaping nonprintable characters like in C strings. - * Inverse of g_strcompress. The exceptions parameter, if non-NULL, points - * to a string containing characters that are not to be escaped. - * - * Deprecated API: gchar* g_strescape (const gchar *source); - * Luckily this function wasn't used much, using NULL as second parameter - * provides mostly identical semantics. - */ -gchar* g_strescape (const gchar *source, - const gchar *exceptions); - -gpointer g_memdup (gconstpointer mem, - guint byte_size); - -/* NULL terminated string arrays. - * g_strsplit() splits up string into max_tokens tokens at delim and - * returns a newly allocated string array. - * g_strjoinv() concatenates all of str_array's strings, sliding in an - * optional separator, the returned string is newly allocated. - * g_strfreev() frees the array itself and all of its strings. - * g_strdupv() copies a NULL-terminated array of strings - */ -gchar** g_strsplit (const gchar *string, - const gchar *delimiter, - gint max_tokens); -gchar* g_strjoinv (const gchar *separator, - gchar **str_array); -void g_strfreev (gchar **str_array); -gchar** g_strdupv (gchar **str_array); - -gchar* g_stpcpy (gchar *dest, - const char *src); - -G_END_DECLS - -#endif /* __G_STRFUNCS_H__ */ diff --git a/gstring.c b/gstring.c deleted file mode 100644 index df64869a1..000000000 --- a/gstring.c +++ /dev/null @@ -1,616 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <stdarg.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> -#include "glib.h" - -typedef struct _GRealStringChunk GRealStringChunk; -typedef struct _GRealString GRealString; - -struct _GRealStringChunk -{ - GHashTable *const_table; - GSList *storage_list; - gsize storage_next; - gsize this_size; - gsize default_size; -}; - -struct _GRealString -{ - gchar *str; - gsize len; - gsize alloc; -}; - -G_LOCK_DEFINE_STATIC (string_mem_chunk); -static GMemChunk *string_mem_chunk = NULL; - -/* Hash Functions. - */ - -gboolean -g_str_equal (gconstpointer v1, - gconstpointer v2) -{ - const gchar *string1 = v1; - const gchar *string2 = v2; - - return strcmp (string1, string2) == 0; -} - -/* 31 bit hash function */ -guint -g_str_hash (gconstpointer key) -{ - const char *p = key; - guint h = *p; - - if (h) - for (p += 1; *p != '\0'; p++) - h = (h << 5) - h + *p; - - return h; -} - -#define MY_MAXSIZE ((gsize)-1) - -static inline gsize -nearest_power (gsize base, gsize num) -{ - if (num > MY_MAXSIZE / 2) - { - return MY_MAXSIZE; - } - else - { - gsize n = base; - - while (n < num) - n <<= 1; - - return n; - } -} - -/* String Chunks. - */ - -GStringChunk* -g_string_chunk_new (gsize default_size) -{ - GRealStringChunk *new_chunk = g_new (GRealStringChunk, 1); - gsize size = 1; - - size = nearest_power (1, default_size); - - new_chunk->const_table = NULL; - new_chunk->storage_list = NULL; - new_chunk->storage_next = size; - new_chunk->default_size = size; - new_chunk->this_size = size; - - return (GStringChunk*) new_chunk; -} - -void -g_string_chunk_free (GStringChunk *fchunk) -{ - GRealStringChunk *chunk = (GRealStringChunk*) fchunk; - GSList *tmp_list; - - g_return_if_fail (chunk != NULL); - - if (chunk->storage_list) - { - for (tmp_list = chunk->storage_list; tmp_list; tmp_list = tmp_list->next) - g_free (tmp_list->data); - - g_slist_free (chunk->storage_list); - } - - if (chunk->const_table) - g_hash_table_destroy (chunk->const_table); - - g_free (chunk); -} - -gchar* -g_string_chunk_insert (GStringChunk *fchunk, - const gchar *string) -{ - GRealStringChunk *chunk = (GRealStringChunk*) fchunk; - gsize len = strlen (string); - char* pos; - - g_return_val_if_fail (chunk != NULL, NULL); - - if ((chunk->storage_next + len + 1) > chunk->this_size) - { - gsize new_size = nearest_power (chunk->default_size, len + 1); - - chunk->storage_list = g_slist_prepend (chunk->storage_list, - g_new (char, new_size)); - - chunk->this_size = new_size; - chunk->storage_next = 0; - } - - pos = ((char *) chunk->storage_list->data) + chunk->storage_next; - - strcpy (pos, string); - - chunk->storage_next += len + 1; - - return pos; -} - -gchar* -g_string_chunk_insert_const (GStringChunk *fchunk, - const gchar *string) -{ - GRealStringChunk *chunk = (GRealStringChunk*) fchunk; - char* lookup; - - g_return_val_if_fail (chunk != NULL, NULL); - - if (!chunk->const_table) - chunk->const_table = g_hash_table_new (g_str_hash, g_str_equal); - - lookup = (char*) g_hash_table_lookup (chunk->const_table, (gchar *)string); - - if (!lookup) - { - lookup = g_string_chunk_insert (fchunk, string); - g_hash_table_insert (chunk->const_table, lookup, lookup); - } - - return lookup; -} - -/* Strings. - */ -static void -g_string_maybe_expand (GRealString* string, - gsize len) -{ - if (string->len + len >= string->alloc) - { - string->alloc = nearest_power (1, string->len + len + 1); - string->str = g_realloc (string->str, string->alloc); - } -} - -GString* -g_string_sized_new (gsize dfl_size) -{ - GRealString *string; - - G_LOCK (string_mem_chunk); - if (!string_mem_chunk) - string_mem_chunk = g_mem_chunk_new ("string mem chunk", - sizeof (GRealString), - 1024, G_ALLOC_AND_FREE); - - string = g_chunk_new (GRealString, string_mem_chunk); - G_UNLOCK (string_mem_chunk); - - string->alloc = 0; - string->len = 0; - string->str = NULL; - - g_string_maybe_expand (string, MAX (dfl_size, 2)); - string->str[0] = 0; - - return (GString*) string; -} - -GString* -g_string_new (const gchar *init) -{ - GString *string; - - string = g_string_sized_new (init ? strlen (init) + 2 : 2); - - if (init) - g_string_append (string, init); - - return string; -} - -GString* -g_string_new_len (const gchar *init, - gssize len) -{ - GString *string; - - if (len < 0) - return g_string_new (init); - else - { - string = g_string_sized_new (len); - - if (init) - g_string_append_len (string, init, len); - - return string; - } -} - -gchar* -g_string_free (GString *string, - gboolean free_segment) -{ - gchar *segment; - - g_return_val_if_fail (string != NULL, NULL); - - if (free_segment) - { - g_free (string->str); - segment = NULL; - } - else - segment = string->str; - - G_LOCK (string_mem_chunk); - g_mem_chunk_free (string_mem_chunk, string); - G_UNLOCK (string_mem_chunk); - - return segment; -} - -gboolean -g_string_equal (const GString *v, - const GString *v2) -{ - gchar *p, *q; - GRealString *string1 = (GRealString *) v; - GRealString *string2 = (GRealString *) v2; - gsize i = string1->len; - - if (i != string2->len) - return FALSE; - - p = string1->str; - q = string2->str; - while (i) - { - if (*p != *q) - return FALSE; - p++; - q++; - i--; - } - return TRUE; -} - -/* 31 bit hash function */ -guint -g_string_hash (const GString *str) -{ - const gchar *p = str->str; - gsize n = str->len; - guint h = 0; - - while (n--) - { - h = (h << 5) - h + *p; - p++; - } - - return h; -} - -GString* -g_string_assign (GString *string, - const gchar *rval) -{ - g_return_val_if_fail (string != NULL, NULL); - g_return_val_if_fail (rval != NULL, string); - - g_string_truncate (string, 0); - g_string_append (string, rval); - - return string; -} - -GString* -g_string_truncate (GString *fstring, - gsize len) -{ - GRealString *string = (GRealString *) fstring; - - g_return_val_if_fail (string != NULL, NULL); - - string->len = MIN (len, string->len); - - string->str[string->len] = 0; - - return fstring; -} - -GString* -g_string_insert_len (GString *fstring, - gssize pos, - const gchar *val, - gssize len) -{ - GRealString *string = (GRealString *) fstring; - - g_return_val_if_fail (string != NULL, NULL); - g_return_val_if_fail (val != NULL, fstring); - - if (len < 0) - len = strlen (val); - - if (pos < 0) - pos = string->len; - else - g_return_val_if_fail (pos <= string->len, fstring); - - g_string_maybe_expand (string, len); - - /* If we aren't appending at the end, move a hunk - * of the old string to the end, opening up space - */ - if (pos < string->len) - g_memmove (string->str + pos + len, string->str + pos, string->len - pos); - - /* insert the new string */ - g_memmove (string->str + pos, val, len); - - string->len += len; - - string->str[string->len] = 0; - - return fstring; -} - -GString* -g_string_append (GString *fstring, - const gchar *val) -{ - g_return_val_if_fail (fstring != NULL, NULL); - g_return_val_if_fail (val != NULL, fstring); - - return g_string_insert_len (fstring, -1, val, -1); -} - -GString* -g_string_append_len (GString *string, - const gchar *val, - gssize len) -{ - g_return_val_if_fail (string != NULL, NULL); - g_return_val_if_fail (val != NULL, string); - - return g_string_insert_len (string, -1, val, len); -} - -GString* -g_string_append_c (GString *fstring, - gchar c) -{ - g_return_val_if_fail (fstring != NULL, NULL); - - return g_string_insert_c (fstring, -1, c); -} - -GString* -g_string_prepend (GString *fstring, - const gchar *val) -{ - g_return_val_if_fail (fstring != NULL, NULL); - g_return_val_if_fail (val != NULL, fstring); - - return g_string_insert_len (fstring, 0, val, -1); -} - -GString* -g_string_prepend_len (GString *string, - const gchar *val, - gssize len) -{ - g_return_val_if_fail (string != NULL, NULL); - g_return_val_if_fail (val != NULL, string); - - return g_string_insert_len (string, 0, val, len); -} - -GString* -g_string_prepend_c (GString *fstring, - gchar c) -{ - g_return_val_if_fail (fstring != NULL, NULL); - - return g_string_insert_c (fstring, 0, c); -} - -GString* -g_string_insert (GString *fstring, - gssize pos, - const gchar *val) -{ - g_return_val_if_fail (fstring != NULL, NULL); - g_return_val_if_fail (val != NULL, fstring); - if (pos >= 0) - g_return_val_if_fail (pos <= fstring->len, fstring); - - return g_string_insert_len (fstring, pos, val, -1); -} - -GString* -g_string_insert_c (GString *fstring, - gssize pos, - gchar c) -{ - GRealString *string = (GRealString *) fstring; - - g_return_val_if_fail (string != NULL, NULL); - - g_string_maybe_expand (string, 1); - - if (pos < 0) - pos = string->len; - else - g_return_val_if_fail (pos <= string->len, fstring); - - /* If not just an append, move the old stuff */ - if (pos < string->len) - g_memmove (string->str + pos + 1, string->str + pos, string->len - pos); - - string->str[pos] = c; - - string->len += 1; - - string->str[string->len] = 0; - - return fstring; -} - -GString* -g_string_erase (GString *fstring, - gsize pos, - gsize len) -{ - GRealString *string = (GRealString*)fstring; - - g_return_val_if_fail (string != NULL, NULL); - g_return_val_if_fail (pos >= 0, fstring); - g_return_val_if_fail (pos <= string->len, fstring); - - if (len < 0) - len = string->len - pos; - else - { - g_return_val_if_fail (pos + len <= string->len, fstring); - - if (pos + len < string->len) - g_memmove (string->str + pos, string->str + pos + len, string->len - (pos + len)); - } - - string->len -= len; - - string->str[string->len] = 0; - - return fstring; -} - -GString* -g_string_down (GString *fstring) -{ - GRealString *string = (GRealString *) fstring; - guchar *s; - glong n = string->len; - - g_return_val_if_fail (string != NULL, NULL); - - s = (guchar *) string->str; - - while (n) - { - *s = tolower (*s); - s++; - n--; - } - - return fstring; -} - -GString* -g_string_up (GString *fstring) -{ - GRealString *string = (GRealString *) fstring; - guchar *s; - glong n = string->len; - - g_return_val_if_fail (string != NULL, NULL); - - s = (guchar *) string->str; - - while (n) - { - *s = toupper (*s); - s++; - n--; - } - - return fstring; -} - -static void -g_string_printfa_internal (GString *string, - const gchar *fmt, - va_list args) -{ - gchar *buffer; - - buffer = g_strdup_vprintf (fmt, args); - g_string_append (string, buffer); - g_free (buffer); -} - -void -g_string_printf (GString *string, - const gchar *fmt, - ...) -{ - va_list args; - - g_string_truncate (string, 0); - - va_start (args, fmt); - g_string_printfa_internal (string, fmt, args); - va_end (args); -} - -void -g_string_printfa (GString *string, - const gchar *fmt, - ...) -{ - va_list args; - - va_start (args, fmt); - g_string_printfa_internal (string, fmt, args); - va_end (args); -} diff --git a/gstring.h b/gstring.h deleted file mode 100644 index 6c2360db9..000000000 --- a/gstring.h +++ /dev/null @@ -1,110 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_STRING_H__ -#define __G_STRING_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef struct _GString GString; -typedef struct _GStringChunk GStringChunk; - -struct _GString -{ - gchar *str; - gssize len; -}; - -/* String Chunks - */ -GStringChunk* g_string_chunk_new (gsize size); -void g_string_chunk_free (GStringChunk *chunk); -gchar* g_string_chunk_insert (GStringChunk *chunk, - const gchar *string); -gchar* g_string_chunk_insert_const (GStringChunk *chunk, - const gchar *string); - - -/* Strings - */ -GString* g_string_new (const gchar *init); -GString* g_string_new_len (const gchar *init, - gssize len); -GString* g_string_sized_new (gsize dfl_size); -gchar* g_string_free (GString *string, - gboolean free_segment); -gboolean g_string_equal (const GString *v, - const GString *v2); -guint g_string_hash (const GString *str); -GString* g_string_assign (GString *string, - const gchar *rval); -GString* g_string_truncate (GString *string, - gsize len); -GString* g_string_insert_len (GString *string, - gssize pos, - const gchar *val, - gssize len); -GString* g_string_append (GString *string, - const gchar *val); -GString* g_string_append_len (GString *string, - const gchar *val, - gssize len); -GString* g_string_append_c (GString *string, - gchar c); -GString* g_string_prepend (GString *string, - const gchar *val); -GString* g_string_prepend_c (GString *string, - gchar c); -GString* g_string_prepend_len (GString *string, - const gchar *val, - gssize len); -GString* g_string_insert (GString *string, - gssize pos, - const gchar *val); -GString* g_string_insert_c (GString *string, - gssize pos, - gchar c); -GString* g_string_erase (GString *string, - gsize pos, - gsize len); -GString* g_string_down (GString *string); -GString* g_string_up (GString *string); -void g_string_printf (GString *string, - const gchar *format, - ...) G_GNUC_PRINTF (2, 3); -void g_string_printfa (GString *string, - const gchar *format, - ...) G_GNUC_PRINTF (2, 3); -/* compatibility */ -#define g_string_sprintf g_string_printf -#define g_string_sprintfa g_string_printfa - -G_END_DECLS - -#endif /* __G_STRING_H__ */ - diff --git a/gthread.c b/gthread.c deleted file mode 100644 index c906916ec..000000000 --- a/gthread.c +++ /dev/null @@ -1,823 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * gmutex.c: MT safety related functions - * Copyright 1998 Sebastian Wilhelmi; University of Karlsruhe - * Owen Taylor - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#include "config.h" -#include "glib.h" - -#ifdef G_THREAD_USE_PID_SURROGATE -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> -#include <errno.h> -#endif /* G_THREAD_USE_PID_SURROGATE */ - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#include <string.h> - -#if GLIB_SIZEOF_SYSTEM_THREAD == SIZEOF_VOID_P -# define g_system_thread_equal(thread1, thread2) \ - (thread1.dummy_pointer == thread2.dummy_pointer) -# define g_system_thread_assign(dest, src) \ - (dest.dummy_pointer = src.dummy_pointer) -#else /* GLIB_SIZEOF_SYSTEM_THREAD != SIZEOF_VOID_P */ -# define g_system_thread_equal(thread1, thread2) \ - (memcmp (&thread1, &thread2, GLIB_SIZEOF_SYSTEM_THREAD) == 0) -# define g_system_thread_assign(dest, src) \ - (memcpy (&dest, &src, GLIB_SIZEOF_SYSTEM_THREAD)) -#endif /* GLIB_SIZEOF_SYSTEM_THREAD == SIZEOF_VOID_P */ - -GQuark -g_thread_error_quark (void) -{ - static GQuark quark; - if (!quark) - quark = g_quark_from_static_string ("g_thread_error"); - return quark; -} - -/* Keep this in sync with GRealThread in gmain.c! */ -typedef struct _GRealThread GRealThread; -struct _GRealThread -{ - GThread thread; - GMainContext *context; - gpointer private_data; - gpointer retval; - GSystemThread system_thread; -#ifdef G_THREAD_USE_PID_SURROGATE - pid_t pid; -#endif /* G_THREAD_USE_PID_SURROGATE */ -}; - -#ifdef G_THREAD_USE_PID_SURROGATE -static gint priority_map[] = { 15, 0, -15, -20 }; -static gboolean prio_warned = FALSE; -# define SET_PRIO(pid, prio) G_STMT_START{ \ - gint error = setpriority (PRIO_PROCESS, (pid), priority_map[prio]); \ - if (error == -1 && errno == EACCES && !prio_warned) \ - { \ - prio_warned = TRUE; \ - g_warning ("Priorities can only be increased by root."); \ - } \ - }G_STMT_END -#endif /* G_THREAD_USE_PID_SURROGATE */ - -typedef struct _GStaticPrivateNode GStaticPrivateNode; -struct _GStaticPrivateNode -{ - gpointer data; - GDestroyNotify destroy; -}; - -static void g_thread_cleanup (gpointer data); -static void g_thread_fail (void); - -/* Global variables */ - -static GSystemThread zero_thread; /* This is initialized to all zero */ -gboolean g_thread_use_default_impl = TRUE; -gboolean g_threads_got_initialized = FALSE; - -#if defined(G_PLATFORM_WIN32) && defined(__GNUC__) -__declspec(dllexport) -#endif -GThreadFunctions g_thread_functions_for_glib_use = { - (GMutex*(*)())g_thread_fail, /* mutex_new */ - NULL, /* mutex_lock */ - NULL, /* mutex_trylock */ - NULL, /* mutex_unlock */ - NULL, /* mutex_free */ - (GCond*(*)())g_thread_fail, /* cond_new */ - NULL, /* cond_signal */ - NULL, /* cond_broadcast */ - NULL, /* cond_wait */ - NULL, /* cond_timed_wait */ - NULL, /* cond_free */ - (GPrivate*(*)(GDestroyNotify))g_thread_fail, /* private_new */ - NULL, /* private_get */ - NULL, /* private_set */ - (void(*)(GThreadFunc, gpointer, gulong, - gboolean, gboolean, GThreadPriority, - gpointer, GError**))g_thread_fail, /* thread_create */ - NULL, /* thread_yield */ - NULL, /* thread_join */ - NULL, /* thread_exit */ - NULL, /* thread_set_priority */ - NULL /* thread_self */ -}; - -/* Local data */ - -static GMutex *g_mutex_protect_static_mutex_allocation = NULL; -static GPrivate *g_thread_specific_private = NULL; -static GSList *g_thread_all_threads = NULL; -static GSList *g_thread_free_indeces = NULL; - -G_LOCK_DEFINE_STATIC (g_thread); - -/* This must be called only once, before any threads are created. - * It will only be called from g_thread_init() in -lgthread. - */ -void -g_mutex_init (void) -{ - GRealThread* main_thread; - - /* We let the main thread (the one that calls g_thread_init) inherit - * the data, that it set before calling g_thread_init - */ - main_thread = (GRealThread*) g_thread_self (); - - g_thread_specific_private = g_private_new (g_thread_cleanup); - G_THREAD_UF (private_set, (g_thread_specific_private, main_thread)); - G_THREAD_UF (thread_self, (&main_thread->system_thread)); - - g_mutex_protect_static_mutex_allocation = g_mutex_new (); -} - -void -g_static_mutex_init (GStaticMutex *mutex) -{ - static GStaticMutex init_mutex = G_STATIC_MUTEX_INIT; - - g_return_if_fail (mutex); - - *mutex = init_mutex; -} - -GMutex * -g_static_mutex_get_mutex_impl (GMutex** mutex) -{ - if (!g_thread_supported ()) - return NULL; - - g_assert (g_mutex_protect_static_mutex_allocation); - - g_mutex_lock (g_mutex_protect_static_mutex_allocation); - - if (!(*mutex)) - *mutex = g_mutex_new (); - - g_mutex_unlock (g_mutex_protect_static_mutex_allocation); - - return *mutex; -} - -void -g_static_mutex_free (GStaticMutex* mutex) -{ - GMutex **runtime_mutex; - - g_return_if_fail (mutex); - - /* The runtime_mutex is the first (or only) member of GStaticMutex, - * see both versions (of glibconfig.h) in configure.in */ - runtime_mutex = ((GMutex**)mutex); - - if (*runtime_mutex) - g_mutex_free (*runtime_mutex); - - *runtime_mutex = NULL; -} - -void -g_static_rec_mutex_init (GStaticRecMutex *mutex) -{ - static GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT; - - g_return_if_fail (mutex); - - *mutex = init_mutex; -} - -void -g_static_rec_mutex_lock (GStaticRecMutex* mutex) -{ - GSystemThread self; - - g_return_if_fail (mutex); - - if (!g_thread_supported ()) - return; - - G_THREAD_UF (thread_self, (&self)); - - if (g_system_thread_equal (self, mutex->owner)) - { - mutex->depth++; - return; - } - g_static_mutex_lock (&mutex->mutex); - g_system_thread_assign (mutex->owner, self); - mutex->depth = 1; -} - -gboolean -g_static_rec_mutex_trylock (GStaticRecMutex* mutex) -{ - GSystemThread self; - - g_return_val_if_fail (mutex, FALSE); - - if (!g_thread_supported ()) - return TRUE; - - G_THREAD_UF (thread_self, (&self)); - - if (g_system_thread_equal (self, mutex->owner)) - { - mutex->depth++; - return TRUE; - } - - if (!g_static_mutex_trylock (&mutex->mutex)) - return FALSE; - - g_system_thread_assign (mutex->owner, self); - mutex->depth = 1; - return TRUE; -} - -void -g_static_rec_mutex_unlock (GStaticRecMutex* mutex) -{ - g_return_if_fail (mutex); - - if (!g_thread_supported ()) - return; - - if (mutex->depth > 1) - { - mutex->depth--; - return; - } - g_system_thread_assign (mutex->owner, zero_thread); - g_static_mutex_unlock (&mutex->mutex); -} - -void -g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, - guint depth) -{ - GSystemThread self; - g_return_if_fail (mutex); - - if (!g_thread_supported ()) - return; - - G_THREAD_UF (thread_self, (&self)); - - if (g_system_thread_equal (self, mutex->owner)) - { - mutex->depth += depth; - return; - } - g_static_mutex_lock (&mutex->mutex); - g_system_thread_assign (mutex->owner, self); - mutex->depth = depth; -} - -guint -g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex) -{ - gint depth; - - g_return_val_if_fail (mutex, 0); - - if (!g_thread_supported ()) - return 1; - - depth = mutex->depth; - - g_system_thread_assign (mutex->owner, zero_thread); - mutex->depth = 0; - g_static_mutex_unlock (&mutex->mutex); - - return depth; -} - -void -g_static_rec_mutex_free (GStaticRecMutex *mutex) -{ - g_return_if_fail (mutex); - - g_static_mutex_free (&mutex->mutex); -} - -void -g_static_private_init (GStaticPrivate *private_key) -{ - private_key->index = 0; -} - -gpointer -g_static_private_get (GStaticPrivate *private_key) -{ - GRealThread *self = (GRealThread*) g_thread_self (); - GArray *array; - - array = self->private_data; - if (!array) - return NULL; - - if (!private_key->index) - return NULL; - else if (private_key->index <= array->len) - return g_array_index (array, GStaticPrivateNode, - private_key->index - 1).data; - else - return NULL; -} - -void -g_static_private_set (GStaticPrivate *private_key, - gpointer data, - GDestroyNotify notify) -{ - GRealThread *self = (GRealThread*) g_thread_self (); - GArray *array; - static guint next_index = 0; - GStaticPrivateNode *node; - - array = self->private_data; - if (!array) - { - array = g_array_new (FALSE, TRUE, sizeof (GStaticPrivateNode)); - self->private_data = array; - } - - if (!private_key->index) - { - G_LOCK (g_thread); - - if (!private_key->index) - { - if (g_thread_free_indeces) - { - private_key->index = - GPOINTER_TO_UINT (g_thread_free_indeces->data); - g_thread_free_indeces = - g_slist_delete_link (g_thread_free_indeces, - g_thread_free_indeces); - } - else - private_key->index = ++next_index; - } - - G_UNLOCK (g_thread); - } - - if (private_key->index > array->len) - g_array_set_size (array, private_key->index); - - node = &g_array_index (array, GStaticPrivateNode, private_key->index - 1); - if (node->destroy) - { - gpointer ddata = node->data; - GDestroyNotify ddestroy = node->destroy; - - node->data = data; - node->destroy = notify; - - ddestroy (ddata); - } - else - { - node->data = data; - node->destroy = notify; - } -} - -void -g_static_private_free (GStaticPrivate *private_key) -{ - guint index = private_key->index; - GSList *list; - - if (!index) - return; - - private_key->index = 0; - - G_LOCK (g_thread); - list = g_thread_all_threads; - while (list) - { - GRealThread *thread = list->data; - GArray *array = thread->private_data; - list = list->next; - - if (array && index <= array->len) - { - GStaticPrivateNode *node = &g_array_index (array, - GStaticPrivateNode, - index - 1); - gpointer ddata = node->data; - GDestroyNotify ddestroy = node->destroy; - - node->data = NULL; - node->destroy = NULL; - - if (ddestroy) - { - G_UNLOCK (g_thread); - ddestroy (ddata); - G_LOCK (g_thread); - } - } - } - g_thread_free_indeces = g_slist_prepend (g_thread_free_indeces, - GUINT_TO_POINTER (index)); - G_UNLOCK (g_thread); -} - -void g_main_context_destroy (GMainContext *context); - -static void -g_thread_cleanup (gpointer data) -{ - if (data) - { - GRealThread* thread = data; - if (thread->private_data) - { - GArray* array = thread->private_data; - guint i; - - for (i = 0; i < array->len; i++ ) - { - GStaticPrivateNode *node = - &g_array_index (array, GStaticPrivateNode, i); - if (node->destroy) - node->destroy (node->data); - } - g_array_free (array, TRUE); - } - if (thread->context) - g_main_context_destroy (thread->context); - - /* We only free the thread structure, if it isn't joinable. If - it is, the structure is freed in g_thread_join */ - if (!thread->thread.joinable) - { - G_LOCK (g_thread); - g_thread_all_threads = g_slist_remove (g_thread_all_threads, data); - G_UNLOCK (g_thread); - - /* Just to make sure, this isn't used any more */ - g_system_thread_assign (thread->system_thread, zero_thread); - g_free (thread); - } - } -} - -static void -g_thread_fail (void) -{ - g_error ("The thread system is not yet initialized."); -} - -static gpointer -g_thread_create_proxy (gpointer data) -{ - GRealThread* thread = data; - - g_assert (data); - -#ifdef G_THREAD_USE_PID_SURROGATE - thread->pid = getpid (); -#endif /* G_THREAD_USE_PID_SURROGATE */ - - /* This has to happen before G_LOCK, as that might call g_thread_self */ - g_private_set (g_thread_specific_private, data); - - /* the lock makes sure, that thread->system_thread is written, - before thread->thread.func is called. See g_thread_create. */ - G_LOCK (g_thread); - G_UNLOCK (g_thread); - -#ifdef G_THREAD_USE_PID_SURROGATE - if (g_thread_use_default_impl) - SET_PRIO (thread->pid, thread->thread.priority); -#endif /* G_THREAD_USE_PID_SURROGATE */ - - thread->retval = thread->thread.func (thread->thread.data); - - return NULL; -} - -GThread* -g_thread_create_full (GThreadFunc func, - gpointer data, - gulong stack_size, - gboolean joinable, - gboolean bound, - GThreadPriority priority, - GError **error) -{ - GRealThread* result = g_new (GRealThread, 1); - GError *local_error = NULL; - g_return_val_if_fail (func, NULL); - g_return_val_if_fail (priority >= G_THREAD_PRIORITY_LOW, NULL); - g_return_val_if_fail (priority <= G_THREAD_PRIORITY_URGENT, NULL); - - result->thread.joinable = joinable; - result->thread.priority = priority; - result->thread.func = func; - result->thread.data = data; - result->private_data = NULL; - result->context = NULL; - G_LOCK (g_thread); - G_THREAD_UF (thread_create, (g_thread_create_proxy, result, - stack_size, joinable, bound, priority, - &result->system_thread, &local_error)); - g_thread_all_threads = g_slist_prepend (g_thread_all_threads, result); - G_UNLOCK (g_thread); - - if (local_error) - { - g_propagate_error (error, local_error); - g_free (result); - return NULL; - } - - return (GThread*) result; -} - -void -g_thread_exit (gpointer retval) -{ - GRealThread* real = (GRealThread*) g_thread_self (); - real->retval = retval; - G_THREAD_CF (thread_exit, (void)0, ()); -} - -gpointer -g_thread_join (GThread* thread) -{ - GRealThread* real = (GRealThread*) thread; - gpointer retval; - - g_return_val_if_fail (thread, NULL); - g_return_val_if_fail (thread->joinable, NULL); - g_return_val_if_fail (!g_system_thread_equal (real->system_thread, - zero_thread), NULL); - - G_THREAD_UF (thread_join, (&real->system_thread)); - - retval = real->retval; - - G_LOCK (g_thread); - g_thread_all_threads = g_slist_remove (g_thread_all_threads, thread); - G_UNLOCK (g_thread); - - /* Just to make sure, this isn't used any more */ - thread->joinable = 0; - g_system_thread_assign (real->system_thread, zero_thread); - - /* the thread structure for non-joinable threads is freed upon - thread end. We free the memory here. This will leave a loose end, - if a joinable thread is not joined. */ - - g_free (thread); - - return retval; -} - -void -g_thread_set_priority (GThread* thread, - GThreadPriority priority) -{ - GRealThread* real = (GRealThread*) thread; - - g_return_if_fail (thread); - g_return_if_fail (!g_system_thread_equal (real->system_thread, zero_thread)); - g_return_if_fail (priority >= G_THREAD_PRIORITY_LOW); - g_return_if_fail (priority <= G_THREAD_PRIORITY_URGENT); - - thread->priority = priority; - -#ifdef G_THREAD_USE_PID_SURROGATE - if (g_thread_use_default_impl) - SET_PRIO (real->pid, priority); - else -#endif /* G_THREAD_USE_PID_SURROGATE */ - G_THREAD_CF (thread_set_priority, (void)0, - (&real->system_thread, priority)); -} - -GThread* -g_thread_self (void) -{ - GRealThread* thread = g_private_get (g_thread_specific_private); - - if (!thread) - { - /* If no thread data is available, provide and set one. This - can happen for the main thread and for threads, that are not - created by GLib. */ - thread = g_new (GRealThread, 1); - thread->thread.joinable = FALSE; /* This is a save guess */ - thread->thread.priority = G_THREAD_PRIORITY_NORMAL; /* This is - just a guess */ - thread->thread.func = NULL; - thread->thread.data = NULL; - thread->private_data = NULL; - thread->context = NULL; - - if (g_thread_supported ()) - G_THREAD_UF (thread_self, (&thread->system_thread)); - -#ifdef G_THREAD_USE_PID_SURROGATE - thread->pid = getpid (); -#endif /* G_THREAD_USE_PID_SURROGATE */ - - g_private_set (g_thread_specific_private, thread); - - G_LOCK (g_thread); - g_thread_all_threads = g_slist_prepend (g_thread_all_threads, thread); - G_UNLOCK (g_thread); - } - - return (GThread*)thread; -} - -void -g_static_rw_lock_init (GStaticRWLock* lock) -{ - static GStaticRWLock init_lock = G_STATIC_RW_LOCK_INIT; - - g_return_if_fail (lock); - - *lock = init_lock; -} - -static void inline -g_static_rw_lock_wait (GCond** cond, GStaticMutex* mutex) -{ - if (!*cond) - *cond = g_cond_new (); - g_cond_wait (*cond, g_static_mutex_get_mutex (mutex)); -} - -static void inline -g_static_rw_lock_signal (GStaticRWLock* lock) -{ - if (lock->want_to_write && lock->write_cond) - g_cond_signal (lock->write_cond); - else if (lock->read_cond) - g_cond_broadcast (lock->read_cond); -} - -void -g_static_rw_lock_reader_lock (GStaticRWLock* lock) -{ - g_return_if_fail (lock); - - if (!g_threads_got_initialized) - return; - - g_static_mutex_lock (&lock->mutex); - while (lock->write || lock->want_to_write) - g_static_rw_lock_wait (&lock->read_cond, &lock->mutex); - lock->read_counter++; - g_static_mutex_unlock (&lock->mutex); -} - -gboolean -g_static_rw_lock_reader_trylock (GStaticRWLock* lock) -{ - gboolean ret_val = FALSE; - - g_return_val_if_fail (lock, FALSE); - - if (!g_threads_got_initialized) - return TRUE; - - g_static_mutex_lock (&lock->mutex); - if (!lock->write && !lock->want_to_write) - { - lock->read_counter++; - ret_val = TRUE; - } - g_static_mutex_unlock (&lock->mutex); - return ret_val; -} - -void -g_static_rw_lock_reader_unlock (GStaticRWLock* lock) -{ - g_return_if_fail (lock); - - if (!g_threads_got_initialized) - return; - - g_static_mutex_lock (&lock->mutex); - lock->read_counter--; - if (lock->read_counter == 0) - g_static_rw_lock_signal (lock); - g_static_mutex_unlock (&lock->mutex); -} - -void -g_static_rw_lock_writer_lock (GStaticRWLock* lock) -{ - g_return_if_fail (lock); - - if (!g_threads_got_initialized) - return; - - g_static_mutex_lock (&lock->mutex); - lock->want_to_write++; - while (lock->write || lock->read_counter) - g_static_rw_lock_wait (&lock->write_cond, &lock->mutex); - lock->want_to_write--; - lock->write = TRUE; - g_static_mutex_unlock (&lock->mutex); -} - -gboolean -g_static_rw_lock_writer_trylock (GStaticRWLock* lock) -{ - gboolean ret_val = FALSE; - - g_return_val_if_fail (lock, FALSE); - - if (!g_threads_got_initialized) - return TRUE; - - g_static_mutex_lock (&lock->mutex); - if (!lock->write && !lock->read_counter) - { - lock->write = TRUE; - ret_val = TRUE; - } - g_static_mutex_unlock (&lock->mutex); - return ret_val; -} - -void -g_static_rw_lock_writer_unlock (GStaticRWLock* lock) -{ - g_return_if_fail (lock); - - if (!g_threads_got_initialized) - return; - - g_static_mutex_lock (&lock->mutex); - lock->write = FALSE; - g_static_rw_lock_signal (lock); - g_static_mutex_unlock (&lock->mutex); -} - -void -g_static_rw_lock_free (GStaticRWLock* lock) -{ - g_return_if_fail (lock); - - if (lock->read_cond) - { - g_cond_free (lock->read_cond); - lock->read_cond = NULL; - } - if (lock->write_cond) - { - g_cond_free (lock->write_cond); - lock->write_cond = NULL; - } - g_static_mutex_free (&lock->mutex); -} diff --git a/gthread.h b/gthread.h deleted file mode 100644 index 4656270b9..000000000 --- a/gthread.h +++ /dev/null @@ -1,334 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_THREAD_H__ -#define __G_THREAD_H__ - -#include <gerror.h> -#include <gtypes.h> - -G_BEGIN_DECLS - -/* GLib Thread support - */ - -extern GQuark g_thread_error_quark (void); -#define G_THREAD_ERROR g_thread_error_quark () - -typedef enum -{ - G_THREAD_ERROR_AGAIN /* Resource temporarily unavailable */ -} GThreadError; - -typedef gpointer (*GThreadFunc) (gpointer data); - -typedef enum -{ - G_THREAD_PRIORITY_LOW, - G_THREAD_PRIORITY_NORMAL, - G_THREAD_PRIORITY_HIGH, - G_THREAD_PRIORITY_URGENT -} GThreadPriority; - -typedef struct _GThread GThread; -struct _GThread -{ - GThreadFunc func; - gpointer data; - gboolean joinable; - GThreadPriority priority; -}; - -typedef struct _GMutex GMutex; -typedef struct _GCond GCond; -typedef struct _GPrivate GPrivate; -typedef struct _GStaticPrivate GStaticPrivate; - -typedef struct _GThreadFunctions GThreadFunctions; -struct _GThreadFunctions -{ - GMutex* (*mutex_new) (void); - void (*mutex_lock) (GMutex *mutex); - gboolean (*mutex_trylock) (GMutex *mutex); - void (*mutex_unlock) (GMutex *mutex); - void (*mutex_free) (GMutex *mutex); - GCond* (*cond_new) (void); - void (*cond_signal) (GCond *cond); - void (*cond_broadcast) (GCond *cond); - void (*cond_wait) (GCond *cond, - GMutex *mutex); - gboolean (*cond_timed_wait) (GCond *cond, - GMutex *mutex, - GTimeVal *end_time); - void (*cond_free) (GCond *cond); - GPrivate* (*private_new) (GDestroyNotify destructor); - gpointer (*private_get) (GPrivate *private_key); - void (*private_set) (GPrivate *private_key, - gpointer data); - void (*thread_create) (GThreadFunc func, - gpointer data, - gulong stack_size, - gboolean joinable, - gboolean bound, - GThreadPriority priority, - gpointer thread, - GError **error); - void (*thread_yield) (void); - void (*thread_join) (gpointer thread); - void (*thread_exit) (void); - void (*thread_set_priority)(gpointer thread, - GThreadPriority priority); - void (*thread_self) (gpointer thread); -}; - -GLIB_VAR GThreadFunctions g_thread_functions_for_glib_use; -GLIB_VAR gboolean g_thread_use_default_impl; -GLIB_VAR gboolean g_threads_got_initialized; - -/* initializes the mutex/cond/private implementation for glib, might - * only be called once, and must not be called directly or indirectly - * from another glib-function, e.g. as a callback. - */ -void g_thread_init (GThreadFunctions *vtable); - -/* Errorcheck mutexes. If you define G_ERRORCHECK_MUTEXES, then all - * mutexes will check for re-locking and re-unlocking */ - -/* Initialize thread system with errorcheck mutexes. vtable must be - * NULL. Do not call directly. Use #define G_ERRORCHECK_MUTEXES - * instead. - */ -void g_thread_init_with_errorcheck_mutexes (GThreadFunctions* vtable); - -/* A random number to recognize debug calls to g_mutex_... */ -#define G_MUTEX_DEBUG_MAGIC 0xf8e18ad7 - -#ifdef G_ERRORCHECK_MUTEXES -#define g_thread_init(vtable) g_thread_init_with_errorcheck_mutexes (vtable) -#endif - -/* internal function for fallback static mutex implementation */ -GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex); - -/* shorthands for conditional and unconditional function calls */ - -#define G_THREAD_UF(op, arglist) \ - (*g_thread_functions_for_glib_use . op) arglist -#define G_THREAD_CF(op, fail, arg) \ - (g_thread_supported () ? G_THREAD_UF (op, arg) : (fail)) -#define G_THREAD_ECF(op, fail, mutex, type) \ - (g_thread_supported () ? ((type(*)(GMutex*, gulong, gchar*)) \ - (*g_thread_functions_for_glib_use . op)) \ - (mutex, G_MUTEX_DEBUG_MAGIC, G_STRLOC) : (fail)) - -#ifndef G_ERRORCHECK_MUTEXES -# define g_mutex_lock(mutex) \ - G_THREAD_CF (mutex_lock, (void)0, (mutex)) -# define g_mutex_trylock(mutex) \ - G_THREAD_CF (mutex_trylock, TRUE, (mutex)) -# define g_mutex_unlock(mutex) \ - G_THREAD_CF (mutex_unlock, (void)0, (mutex)) -# define g_mutex_free(mutex) \ - G_THREAD_CF (mutex_free, (void)0, (mutex)) -# define g_cond_wait(cond, mutex) \ - G_THREAD_CF (cond_wait, (void)0, (cond, mutex)) -# define g_cond_timed_wait(cond, mutex, abs_time) \ - G_THREAD_CF (cond_timed_wait, TRUE, (cond, mutex, abs_time)) -#else /* G_ERRORCHECK_MUTEXES */ -# define g_mutex_lock(mutex) \ - G_THREAD_ECF (mutex_lock, (void)0, (mutex), void) -# define g_mutex_trylock(mutex) \ - G_THREAD_ECF (mutex_trylock, TRUE, (mutex), gboolean) -# define g_mutex_unlock(mutex) \ - G_THREAD_ECF (mutex_unlock, (void)0, (mutex), void) -# define g_mutex_free(mutex) \ - G_THREAD_ECF (mutex_free, (void)0, (mutex), void) -# define g_cond_wait(cond, mutex) \ - (g_thread_supported () ? ((void(*)(GCond*, GMutex*, gulong, gchar*))\ - g_thread_functions_for_glib_use.cond_wait) \ - (cond, mutex, G_MUTEX_DEBUG_MAGIC, G_STRLOC) : (void) 0) -# define g_cond_timed_wait(cond, mutex, abs_time) \ - (g_thread_supported () ? \ - ((gboolean(*)(GCond*, GMutex*, GTimeVal*, gulong, gchar*)) \ - g_thread_functions_for_glib_use.cond_timed_wait) \ - (cond, mutex, abs_time, G_MUTEX_DEBUG_MAGIC, G_STRLOC) : TRUE) -#endif /* G_ERRORCHECK_MUTEXES */ - -#define g_thread_supported() (g_threads_got_initialized) -#define g_mutex_new() G_THREAD_UF (mutex_new, ()) -#define g_cond_new() G_THREAD_UF (cond_new, ()) -#define g_cond_signal(cond) G_THREAD_CF (cond_signal, (void)0, (cond)) -#define g_cond_broadcast(cond) G_THREAD_CF (cond_broadcast, (void)0, (cond)) -#define g_cond_free(cond) G_THREAD_CF (cond_free, (void)0, (cond)) -#define g_private_new(destructor) G_THREAD_UF (private_new, (destructor)) -#define g_private_get(private_key) G_THREAD_CF (private_get, \ - ((gpointer)private_key), \ - (private_key)) -#define g_private_set(private_key, value) G_THREAD_CF (private_set, \ - (void) (private_key = \ - (GPrivate*) (value)), \ - (private_key, value)) -#define g_thread_yield() G_THREAD_CF (thread_yield, (void)0, ()) - -#define g_thread_create(func, data, joinable, error) \ - (g_thread_create_full (func, data, 0, joinable, FALSE, \ - G_THREAD_PRIORITY_NORMAL, error)) - -GThread* g_thread_create_full (GThreadFunc func, - gpointer data, - gulong stack_size, - gboolean joinable, - gboolean bound, - GThreadPriority priority, - GError **error); -GThread* g_thread_self (void); -void g_thread_exit (gpointer retval); -gpointer g_thread_join (GThread *thread); - -void g_thread_set_priority (GThread *thread, - GThreadPriority priority); - -/* GStaticMutexes can be statically initialized with the value - * G_STATIC_MUTEX_INIT, and then they can directly be used, that is - * much easier, than having to explicitly allocate the mutex before - * use - */ -#define g_static_mutex_lock(mutex) \ - g_mutex_lock (g_static_mutex_get_mutex (mutex)) -#define g_static_mutex_trylock(mutex) \ - g_mutex_trylock (g_static_mutex_get_mutex (mutex)) -#define g_static_mutex_unlock(mutex) \ - g_mutex_unlock (g_static_mutex_get_mutex (mutex)) -void g_static_mutex_init (GStaticMutex *mutex); -void g_static_mutex_free (GStaticMutex *mutex); - -struct _GStaticPrivate -{ - guint index; -}; -#define G_STATIC_PRIVATE_INIT { 0 } -void g_static_private_init (GStaticPrivate *private_key); -gpointer g_static_private_get (GStaticPrivate *private_key); -void g_static_private_set (GStaticPrivate *private_key, - gpointer data, - GDestroyNotify notify); -void g_static_private_free (GStaticPrivate *private_key); - -typedef struct _GStaticRecMutex GStaticRecMutex; -struct _GStaticRecMutex -{ - GStaticMutex mutex; - unsigned int depth; - GSystemThread owner; -}; - -#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT } -void g_static_rec_mutex_init (GStaticRecMutex *mutex); -void g_static_rec_mutex_lock (GStaticRecMutex *mutex); -gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex); -void g_static_rec_mutex_unlock (GStaticRecMutex *mutex); -void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, - guint depth); -guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); -void g_static_rec_mutex_free (GStaticRecMutex *mutex); - -typedef struct _GStaticRWLock GStaticRWLock; -struct _GStaticRWLock -{ - GStaticMutex mutex; - GCond *read_cond; - GCond *write_cond; - guint read_counter; - gboolean write; - guint want_to_write; -}; - -#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, FALSE } - -void g_static_rw_lock_init (GStaticRWLock* lock); -void g_static_rw_lock_reader_lock (GStaticRWLock* lock); -gboolean g_static_rw_lock_reader_trylock (GStaticRWLock* lock); -void g_static_rw_lock_reader_unlock (GStaticRWLock* lock); -void g_static_rw_lock_writer_lock (GStaticRWLock* lock); -gboolean g_static_rw_lock_writer_trylock (GStaticRWLock* lock); -void g_static_rw_lock_writer_unlock (GStaticRWLock* lock); -void g_static_rw_lock_free (GStaticRWLock* lock); - -/* these are some convenience macros that expand to nothing if GLib - * was configured with --disable-threads. for using StaticMutexes, - * you define them with G_LOCK_DEFINE_STATIC (name) or G_LOCK_DEFINE (name) - * if you need to export the mutex. With G_LOCK_EXTERN (name) you can - * declare such an globally defined lock. name is a unique identifier - * for the protected varibale or code portion. locking, testing and - * unlocking of such mutexes can be done with G_LOCK(), G_UNLOCK() and - * G_TRYLOCK() respectively. - */ -extern void glib_dummy_decl (void); -#define G_LOCK_NAME(name) g__ ## name ## _lock -#ifdef G_THREADS_ENABLED -# define G_LOCK_DEFINE_STATIC(name) static G_LOCK_DEFINE (name) -# define G_LOCK_DEFINE(name) \ - GStaticMutex G_LOCK_NAME (name) = G_STATIC_MUTEX_INIT -# define G_LOCK_EXTERN(name) extern GStaticMutex G_LOCK_NAME (name) - -# ifdef G_DEBUG_LOCKS -# define G_LOCK(name) G_STMT_START{ \ - g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ - "file %s: line %d (%s): locking: %s ", \ - __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \ - #name); \ - g_static_mutex_lock (&G_LOCK_NAME (name)); \ - }G_STMT_END -# define G_UNLOCK(name) G_STMT_START{ \ - g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ - "file %s: line %d (%s): unlocking: %s ", \ - __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \ - #name); \ - g_static_mutex_unlock (&G_LOCK_NAME (name)); \ - }G_STMT_END -# define G_TRYLOCK(name) \ - (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ - "file %s: line %d (%s): try locking: %s ", \ - __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \ - #name), g_static_mutex_trylock (&G_LOCK_NAME (name))) -# else /* !G_DEBUG_LOCKS */ -# define G_LOCK(name) g_static_mutex_lock (&G_LOCK_NAME (name)) -# define G_UNLOCK(name) g_static_mutex_unlock (&G_LOCK_NAME (name)) -# define G_TRYLOCK(name) g_static_mutex_trylock (&G_LOCK_NAME (name)) -# endif /* !G_DEBUG_LOCKS */ -#else /* !G_THREADS_ENABLED */ -# define G_LOCK_DEFINE_STATIC(name) extern void glib_dummy_decl (void) -# define G_LOCK_DEFINE(name) extern void glib_dummy_decl (void) -# define G_LOCK_EXTERN(name) extern void glib_dummy_decl (void) -# define G_LOCK(name) -# define G_UNLOCK(name) -# define G_TRYLOCK(name) (TRUE) -#endif /* !G_THREADS_ENABLED */ - -G_END_DECLS - -#endif /* __G_THREAD_H__ */ - diff --git a/gthread/Makefile.am b/gthread/Makefile.am index 995069041..0928fd9d6 100644 --- a/gthread/Makefile.am +++ b/gthread/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gthread \ +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_srcdir)/gthread \ -DG_LOG_DOMAIN=\"GThread\" @GTHREAD_COMPILE_IMPL_DEFINES@ \ @GLIB_DEBUG_FLAGS@ @@ -19,7 +19,7 @@ BUILT_EXTRA_DIST = \ makefile.msc \ gthread.rc -libglib = $(top_builddir)/libglib-1.3.la +libglib = $(top_builddir)/glib/libglib-1.3.la top_builddir_full=`cd \$(top_builddir); pwd` diff --git a/gthreadpool.c b/gthreadpool.c deleted file mode 100644 index 601022830..000000000 --- a/gthreadpool.c +++ /dev/null @@ -1,678 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * GAsyncQueue: thread pool implementation. - * Copyright (C) 2000 Sebastian Wilhelmi; University of Karlsruhe - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * MT safe - */ - -#include "glib.h" - -typedef struct _GRealThreadPool GRealThreadPool; - -struct _GRealThreadPool -{ - GThreadPool pool; - GAsyncQueue* queue; - gint max_threads; - gint num_threads; - gboolean running; - gboolean immediate; - gboolean waiting; -}; - -/* The following is just an address to mark the stop order for a - * thread, it could be any address (as long, as it isn't a valid - * GThreadPool address) */ -static const gpointer stop_this_thread_marker = (gpointer) &g_thread_pool_new; - -/* Here all unused threads are waiting */ -static GAsyncQueue *unused_thread_queue; -static gint unused_threads = 0; -static gint max_unused_threads = 0; -G_LOCK_DEFINE_STATIC (unused_threads); - -static GMutex *inform_mutex = NULL; -static GCond *inform_cond = NULL; - -static void g_thread_pool_free_internal (GRealThreadPool* pool); -static gpointer g_thread_pool_thread_proxy (gpointer data); -static void g_thread_pool_start_thread (GRealThreadPool* pool, - GError **error); -static void g_thread_pool_wakeup_and_stop_all (GRealThreadPool* pool); - -#define g_thread_should_run(pool, len) \ - ((pool)->running || (!(pool)->immediate && (len) > 0)) - -static gpointer -g_thread_pool_thread_proxy (gpointer data) -{ - GRealThreadPool *pool = data; - gboolean watcher = FALSE; - - g_async_queue_lock (pool->queue); - while (TRUE) - { - gpointer task; - gboolean goto_global_pool = !pool->pool.exclusive; - gint len = g_async_queue_length_unlocked (pool->queue); - - if (g_thread_should_run (pool, len)) - { - if (watcher) - { - /* This thread is actually not needed here, but it waits - * for some time anyway. If during that time a new - * request arrives, this saves process - * swicthes. Otherwise the thread will go to the global - * pool afterwards */ - GTimeVal end_time; - g_get_current_time (&end_time); - g_time_val_add (&end_time, G_USEC_PER_SEC / 2); /* 1/2 second */ - task = g_async_queue_timed_pop_unlocked (pool->queue, &end_time); - } - else - task = g_async_queue_pop_unlocked (pool->queue); - - if (task) - { - watcher = FALSE; - if (pool->num_threads > pool->max_threads && - pool->max_threads != -1) - /* We are in fact a superfluous threads, so we go to - * the global pool and just hand the data further to - * the next one waiting in the queue */ - { - g_async_queue_push_unlocked (pool->queue, task); - goto_global_pool = TRUE; - } - else if (pool->running || !pool->immediate) - { - g_async_queue_unlock (pool->queue); - pool->pool.func (task, pool->pool.user_data); - g_async_queue_lock (pool->queue); - } - } - len = g_async_queue_length_unlocked (pool->queue); - } - - if (!g_thread_should_run (pool, len)) - { - g_cond_broadcast (inform_cond); - goto_global_pool = TRUE; - } - else if (len > 0) - { - /* At this pool there are no threads waiting, but tasks are. */ - goto_global_pool = FALSE; - } - else if (len == 0 && !watcher && !pool->pool.exclusive) - { - /* Here neither threads nor tasks are queued and we didn't - * just return from a timed wait. We now wait for a limited - * time at this pool for new tasks to avoid costly context - * switches. */ - goto_global_pool = FALSE; - watcher = TRUE; - } - - - if (goto_global_pool) - { - pool->num_threads--; - - if (!pool->running && !pool->waiting) - { - if (pool->num_threads == 0) - { - g_async_queue_unlock (pool->queue); - g_thread_pool_free_internal (pool); - } - else if (len == - pool->num_threads) - { - g_thread_pool_wakeup_and_stop_all (pool); - g_async_queue_unlock (pool->queue); - } - } - else - g_async_queue_unlock (pool->queue); - - g_async_queue_lock (unused_thread_queue); - - G_LOCK (unused_threads); - if ((unused_threads >= max_unused_threads && - max_unused_threads != -1)) - { - G_UNLOCK (unused_threads); - g_async_queue_unlock (unused_thread_queue); - /* Stop this thread */ - return NULL; - } - unused_threads++; - G_UNLOCK (unused_threads); - - pool = g_async_queue_pop_unlocked (unused_thread_queue); - - G_LOCK (unused_threads); - unused_threads--; - G_UNLOCK (unused_threads); - - g_async_queue_unlock (unused_thread_queue); - - if (pool == stop_this_thread_marker) - /* Stop this thread */ - return NULL; - - g_async_queue_lock (pool->queue); - - /* pool->num_threads++ is not done here, but in - * g_thread_pool_start_thread to make the new started thread - * known to the pool, before itself can do it. */ - } - } - return NULL; -} - -static void -g_thread_pool_start_thread (GRealThreadPool *pool, - GError **error) -{ - gboolean success = FALSE; - - if (pool->num_threads >= pool->max_threads && pool->max_threads != -1) - /* Enough threads are already running */ - return; - - g_async_queue_lock (unused_thread_queue); - - if (g_async_queue_length_unlocked (unused_thread_queue) < 0) - { - g_async_queue_push_unlocked (unused_thread_queue, pool); - success = TRUE; - } - - g_async_queue_unlock (unused_thread_queue); - - if (!success) - { - GError *local_error = NULL; - /* No thread was found, we have to start a new one */ - g_thread_create (g_thread_pool_thread_proxy, pool, FALSE, &local_error); - - if (local_error) - { - g_propagate_error (error, local_error); - return; - } - } - - /* See comment in g_thread_pool_thread_proxy as to why this is done - * here and not there */ - pool->num_threads++; -} - -/** - * g_thread_pool_new: - * @func: a function to execute in the threads of the new thread pool - * @user_data: user data that is handed over to @func every time it - * is called - * @max_threads: the maximal number of threads to execute concurrently in - * the new thread pool, -1 means no limit - * @exclusive: should this thread pool be exclusive? - * @error: return location for error - * - * This function creates a new thread pool. - * - * Whenever you call g_thread_pool_push(), either a new thread is - * created or an unused one is reused. At most @max_threads threads - * are running concurrently for this thread pool. @max_threads = -1 - * allows unlimited threads to be created for this thread pool. The - * newly created or reused thread now executes the function @func with - * the two arguments. The first one is the parameter to - * g_thread_pool_push() and the second one is @user_data. - * - * The parameter @exclusive determines, whether the thread pool owns - * all threads exclusive or whether the threads are shared - * globally. If @exclusive is @TRUE, @max_threads threads are started - * immediately and they will run exclusively for this thread pool until - * it is destroyed by g_thread_pool_free(). If @exclusive is @FALSE, - * threads are created, when needed and shared between all - * non-exclusive thread pools. This implies that @max_threads may not - * be -1 for exclusive thread pools. - * - * @error can be NULL to ignore errors, or non-NULL to report - * errors. An error can only occur, when @exclusive is set to @TRUE and - * not all @max_threads threads could be created. - * - * Return value: the new #GThreadPool - **/ -GThreadPool* -g_thread_pool_new (GFunc func, - gpointer user_data, - gint max_threads, - gboolean exclusive, - GError **error) -{ - GRealThreadPool *retval; - G_LOCK_DEFINE_STATIC (init); - - g_return_val_if_fail (func, NULL); - g_return_val_if_fail (!exclusive || max_threads != -1, NULL); - g_return_val_if_fail (max_threads >= -1, NULL); - g_return_val_if_fail (g_thread_supported (), NULL); - - retval = g_new (GRealThreadPool, 1); - - retval->pool.func = func; - retval->pool.user_data = user_data; - retval->pool.exclusive = exclusive; - retval->queue = g_async_queue_new (); - retval->max_threads = max_threads; - retval->num_threads = 0; - retval->running = TRUE; - - G_LOCK (init); - - if (!inform_mutex) - { - inform_mutex = g_mutex_new (); - inform_cond = g_cond_new (); - unused_thread_queue = g_async_queue_new (); - } - - G_UNLOCK (init); - - if (retval->pool.exclusive) - { - g_async_queue_lock (retval->queue); - - while (retval->num_threads < retval->max_threads) - { - GError *local_error = NULL; - g_thread_pool_start_thread (retval, &local_error); - if (local_error) - { - g_propagate_error (error, local_error); - break; - } - } - - g_async_queue_unlock (retval->queue); - } - - return (GThreadPool*) retval; -} - -/** - * g_thread_pool_push: - * @pool: a #GThreadPool - * @data: a new task for @pool - * @error: return location for error - * - * Inserts @data into the list of tasks to be executed by @pool. When - * the number of currently running threads is lower than the maximal - * allowed number of threads, a new thread is started (or reused) with - * the properties given to g_thread_pool_new (). Otherwise @data stays - * in the queue until a thread in this pool finishes its previous task - * and processes @data. - * - * @error can be NULL to ignore errors, or non-NULL to report - * errors. An error can only occur, when a new thread couldn't be - * created. In that case @data is simply appended to the queue of work - * to do. - **/ -void -g_thread_pool_push (GThreadPool *pool, - gpointer data, - GError **error) -{ - GRealThreadPool *real = (GRealThreadPool*) pool; - - g_return_if_fail (real); - - g_async_queue_lock (real->queue); - - if (!real->running) - { - g_async_queue_unlock (real->queue); - g_return_if_fail (real->running); - } - - if (g_async_queue_length_unlocked (real->queue) >= 0) - /* No thread is waiting in the queue */ - g_thread_pool_start_thread (real, error); - - g_async_queue_push_unlocked (real->queue, data); - g_async_queue_unlock (real->queue); -} - -/** - * g_thread_pool_set_max_threads: - * @pool: a #GThreadPool - * @max_threads: a new maximal number of threads for @pool - * @error: return location for error - * - * Sets the maximal allowed number of threads for @pool. A value of -1 - * means, that the maximal number of threads is unlimited. - * - * Setting @max_threads to 0 means stopping all work for @pool. It is - * effectively frozen until @max_threads is set to a non-zero value - * again. - * - * A thread is never terminated while calling @func, as supplied by - * g_thread_pool_new (). Instead the maximal number of threads only - * has effect for the allocation of new threads in g_thread_pool_push - * (). A new thread is allocated, whenever the number of currently - * running threads in @pool is smaller than the maximal number. - * - * @error can be NULL to ignore errors, or non-NULL to report - * errors. An error can only occur, when a new thread couldn't be - * created. - **/ -void -g_thread_pool_set_max_threads (GThreadPool *pool, - gint max_threads, - GError **error) -{ - GRealThreadPool *real = (GRealThreadPool*) pool; - gint to_start; - - g_return_if_fail (real); - g_return_if_fail (real->running); - g_return_if_fail (!real->pool.exclusive || max_threads != -1); - g_return_if_fail (max_threads >= -1); - - g_async_queue_lock (real->queue); - - real->max_threads = max_threads; - - if (pool->exclusive) - to_start = real->max_threads - real->num_threads; - else - to_start = g_async_queue_length_unlocked (real->queue); - - for ( ; to_start > 0; to_start--) - { - GError *local_error = NULL; - g_thread_pool_start_thread (real, &local_error); - if (local_error) - { - g_propagate_error (error, local_error); - break; - } - } - - g_async_queue_unlock (real->queue); -} - -/** - * g_thread_pool_get_max_threads: - * @pool: a #GThreadPool - * - * Returns the maximal number of threads for @pool. - * - * Return value: the maximal number of threads - **/ -gint -g_thread_pool_get_max_threads (GThreadPool *pool) -{ - GRealThreadPool *real = (GRealThreadPool*) pool; - gint retval; - - g_return_val_if_fail (real, 0); - g_return_val_if_fail (real->running, 0); - - g_async_queue_lock (real->queue); - - retval = real->max_threads; - - g_async_queue_unlock (real->queue); - - return retval; -} - -/** - * g_thread_pool_get_num_threads: - * @pool: a #GThreadPool - * - * Returns the number of threads currently running in @pool. - * - * Return value: the number of threads currently running - **/ -guint -g_thread_pool_get_num_threads (GThreadPool *pool) -{ - GRealThreadPool *real = (GRealThreadPool*) pool; - guint retval; - - g_return_val_if_fail (real, 0); - g_return_val_if_fail (real->running, 0); - - g_async_queue_lock (real->queue); - - retval = real->num_threads; - - g_async_queue_unlock (real->queue); - - return retval; -} - -/** - * g_thread_pool_unprocessed: - * @pool: a #GThreadPool - * - * Returns the number of tasks still unprocessed in @pool. - * - * Return value: the number of unprocessed tasks - **/ -guint -g_thread_pool_unprocessed (GThreadPool *pool) -{ - GRealThreadPool *real = (GRealThreadPool*) pool; - gint unprocessed; - - g_return_val_if_fail (real, 0); - g_return_val_if_fail (real->running, 0); - - unprocessed = g_async_queue_length (real->queue); - - return MAX (unprocessed, 0); -} - -/** - * g_thread_pool_free: - * @pool: a #GThreadPool - * @immediate: should @pool shut down immediately? - * @wait: should the function wait for all tasks to be finished? - * - * Frees all resources allocated for @pool. - * - * If @immediate is #TRUE, no new task is processed for - * @pool. Otherwise @pool is not freed before the last task is - * processed. Note however, that no thread of this pool is - * interrupted, while processing a task. Instead at least all still - * running threads can finish their tasks before the @pool is freed. - * - * If @wait is #TRUE, the functions does not return before all tasks - * to be processed (dependent on @immediate, whether all or only the - * currently running) are ready. Otherwise the function returns immediately. - * - * After calling this function @pool must not be used anymore. - **/ -void -g_thread_pool_free (GThreadPool *pool, - gboolean immediate, - gboolean wait) -{ - GRealThreadPool *real = (GRealThreadPool*) pool; - - g_return_if_fail (real); - g_return_if_fail (real->running); - /* It there's no thread allowed here, there is not much sense in - * not stopping this pool immediately, when it's not empty */ - g_return_if_fail (immediate || real->max_threads != 0 || - g_async_queue_length (real->queue) == 0); - - g_async_queue_lock (real->queue); - - real->running = FALSE; - real->immediate = immediate; - real->waiting = wait; - - if (wait) - { - g_mutex_lock (inform_mutex); - while (g_async_queue_length_unlocked (real->queue) != -real->num_threads) - { - g_async_queue_unlock (real->queue); - g_cond_wait (inform_cond, inform_mutex); - g_async_queue_lock (real->queue); - } - g_mutex_unlock (inform_mutex); - } - - if (g_async_queue_length_unlocked (real->queue) == -real->num_threads) - { - /* No thread is currently doing something (and nothing is left - * to process in the queue) */ - if (real->num_threads == 0) /* No threads left, we clean up */ - { - g_async_queue_unlock (real->queue); - g_thread_pool_free_internal (real); - return; - } - - g_thread_pool_wakeup_and_stop_all (real); - } - - real->waiting = FALSE; /* The last thread should cleanup the pool */ - g_async_queue_unlock (real->queue); -} - -static void -g_thread_pool_free_internal (GRealThreadPool* pool) -{ - g_return_if_fail (pool); - g_return_if_fail (!pool->running); - g_return_if_fail (pool->num_threads == 0); - - g_async_queue_unref (pool->queue); - - g_free (pool); -} - -static void -g_thread_pool_wakeup_and_stop_all (GRealThreadPool* pool) -{ - guint i; - - g_return_if_fail (pool); - g_return_if_fail (!pool->running); - g_return_if_fail (pool->num_threads != 0); - g_return_if_fail (g_async_queue_length_unlocked (pool->queue) == - -pool->num_threads); - - pool->immediate = TRUE; - for (i = 0; i < pool->num_threads; i++) - g_async_queue_push_unlocked (pool->queue, GUINT_TO_POINTER (1)); -} - -/** - * g_thread_pool_set_max_unused_threads: - * @max_threads: maximal number of unused threads - * - * Sets the maximal number of unused threads to @max_threads. If - * @max_threads is -1, no limit is imposed on the number of unused - * threads. - **/ -void -g_thread_pool_set_max_unused_threads (gint max_threads) -{ - g_return_if_fail (max_threads >= -1); - - G_LOCK (unused_threads); - - max_unused_threads = max_threads; - - if (max_unused_threads < unused_threads && max_unused_threads != -1) - { - guint i; - - g_async_queue_lock (unused_thread_queue); - for (i = unused_threads - max_unused_threads; i > 0; i--) - g_async_queue_push_unlocked (unused_thread_queue, - stop_this_thread_marker); - g_async_queue_unlock (unused_thread_queue); - } - - G_UNLOCK (unused_threads); -} - -/** - * g_thread_pool_get_max_unused_threads: - * - * Returns the maximal allowed number of unused threads. - * - * Return value: the maximal number of unused threads - **/ -gint -g_thread_pool_get_max_unused_threads (void) -{ - gint retval; - - G_LOCK (unused_threads); - retval = max_unused_threads; - G_UNLOCK (unused_threads); - - return retval; -} - -/** - * g_thread_pool_get_num_unused_threads: - * - * Returns the number of currently unused threads. - * - * Return value: the number of currently unused threads - **/ -guint g_thread_pool_get_num_unused_threads (void) -{ - guint retval; - - G_LOCK (unused_threads); - retval = unused_threads; - G_UNLOCK (unused_threads); - - return retval; -} - -/** - * g_thread_pool_stop_unused_threads: - * - * Stops all currently unused threads. This does not change the - * maximal number of unused threads. This function can be used to - * regularly stop all unused threads e.g. from g_timeout_add(). - **/ -void g_thread_pool_stop_unused_threads (void) -{ - guint oldval = g_thread_pool_get_max_unused_threads (); - g_thread_pool_set_max_unused_threads (0); - g_thread_pool_set_max_unused_threads (oldval); -} diff --git a/gthreadpool.h b/gthreadpool.h deleted file mode 100644 index d2c54fb00..000000000 --- a/gthreadpool.h +++ /dev/null @@ -1,102 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_THREADPOOL_H__ -#define __G_THREADPOOL_H__ - -#include <gthread.h> - -G_BEGIN_DECLS - -typedef struct _GThreadPool GThreadPool; - -/* Thread Pools - */ - -/* The real GThreadPool is bigger, so you may only create a thread - * pool with the constructor function */ -struct _GThreadPool -{ - GFunc func; - gpointer user_data; - gboolean exclusive; -}; - -/* Get a thread pool with the function func, at most max_threads may - * run at a time (max_threads == -1 means no limit), exclusive == TRUE - * means, that the threads shouldn't be shared and that they will be - * prestarted (otherwise they are started as needed) user_data is the - * 2nd argument to the func */ -GThreadPool* g_thread_pool_new (GFunc func, - gpointer user_data, - gint max_threads, - gboolean exclusive, - GError **error); - -/* Push new data into the thread pool. This task is assigned to a thread later - * (when the maximal number of threads is reached for that pool) or now - * (otherwise). If necessary a new thread will be started. The function - * returns immediatly */ -void g_thread_pool_push (GThreadPool *pool, - gpointer data, - GError **error); - -/* Set the number of threads, which can run concurrently for that pool, -1 - * means no limit. 0 means has the effect, that the pool won't process - * requests until the limit is set higher again */ -void g_thread_pool_set_max_threads (GThreadPool *pool, - gint max_threads, - GError **error); -gint g_thread_pool_get_max_threads (GThreadPool *pool); - -/* Get the number of threads assigned to that pool. This number doesn't - * necessarily represent the number of working threads in that pool */ -guint g_thread_pool_get_num_threads (GThreadPool *pool); - -/* Get the number of unprocessed items in the pool */ -guint g_thread_pool_unprocessed (GThreadPool *pool); - -/* Free the pool, immediate means, that all unprocessed items in the queue - * wont be processed, wait means, that the function doesn't return immediatly, - * but after all threads in the pool are ready processing items. immediate - * does however not mean, that threads are killed. */ -void g_thread_pool_free (GThreadPool *pool, - gboolean immediate, - gboolean wait); - -/* Set the maximal number of unused threads before threads will be stopped by - * GLib, -1 means no limit */ -void g_thread_pool_set_max_unused_threads (gint max_threads); -gint g_thread_pool_get_max_unused_threads (void); -guint g_thread_pool_get_num_unused_threads (void); - -/* Stop all currently unused threads, but leave the limit untouched */ -void g_thread_pool_stop_unused_threads (void); - -G_END_DECLS - -#endif /* __G_THREADPOOL_H__ */ - diff --git a/gtimer.c b/gtimer.c deleted file mode 100644 index 2064131f1..000000000 --- a/gtimer.c +++ /dev/null @@ -1,276 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glib.h" -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif /* HAVE_UNISTD_H */ -#ifndef G_OS_WIN32 -#include <sys/time.h> -#include <time.h> -#include <errno.h> -#endif /* G_OS_WIN32 */ - -#ifdef G_OS_WIN32 -#include <windows.h> -#endif /* G_OS_WIN32 */ - -typedef struct _GRealTimer GRealTimer; - -struct _GRealTimer -{ -#ifdef G_OS_WIN32 - DWORD start; - DWORD end; -#else /* !G_OS_WIN32 */ - struct timeval start; - struct timeval end; -#endif /* !G_OS_WIN32 */ - - guint active : 1; -}; - -#ifdef G_OS_WIN32 -# define GETTIME(v) \ - v = GetTickCount () -#else /* !G_OS_WIN32 */ -# define GETTIME(v) \ - gettimeofday (&v, NULL) -#endif /* !G_OS_WIN32 */ - -GTimer* -g_timer_new (void) -{ - GRealTimer *timer; - - timer = g_new (GRealTimer, 1); - timer->active = TRUE; - - GETTIME (timer->start); - - return ((GTimer*) timer); -} - -void -g_timer_destroy (GTimer *timer) -{ - g_return_if_fail (timer != NULL); - - g_free (timer); -} - -void -g_timer_start (GTimer *timer) -{ - GRealTimer *rtimer; - - g_return_if_fail (timer != NULL); - - rtimer = (GRealTimer*) timer; - rtimer->active = TRUE; - - GETTIME (rtimer->start); -} - -void -g_timer_stop (GTimer *timer) -{ - GRealTimer *rtimer; - - g_return_if_fail (timer != NULL); - - rtimer = (GRealTimer*) timer; - rtimer->active = FALSE; - - GETTIME(rtimer->end); -} - -void -g_timer_reset (GTimer *timer) -{ - GRealTimer *rtimer; - - g_return_if_fail (timer != NULL); - - rtimer = (GRealTimer*) timer; - - GETTIME (rtimer->start); -} - -gdouble -g_timer_elapsed (GTimer *timer, - gulong *microseconds) -{ - GRealTimer *rtimer; - gdouble total; -#ifndef G_OS_WIN32 - struct timeval elapsed; -#endif /* G_OS_WIN32 */ - - g_return_val_if_fail (timer != NULL, 0); - - rtimer = (GRealTimer*) timer; - -#ifdef G_OS_WIN32 - if (rtimer->active) - rtimer->end = GetTickCount (); - - /* Check for wraparound, which happens every 49.7 days. */ - if (rtimer->end < rtimer->start) - total = (UINT_MAX - (rtimer->start - rtimer->end)) / 1000.0; - else - total = (rtimer->end - rtimer->start) / 1000.0; - - if (microseconds) - { - if (rtimer->end < rtimer->start) - *microseconds = - ((UINT_MAX - (rtimer->start - rtimer->end)) % 1000) * 1000; - else - *microseconds = - ((rtimer->end - rtimer->start) % 1000) * 1000; - } -#else /* !G_OS_WIN32 */ - if (rtimer->active) - gettimeofday (&rtimer->end, NULL); - - if (rtimer->start.tv_usec > rtimer->end.tv_usec) - { - rtimer->end.tv_usec += G_USEC_PER_SEC; - rtimer->end.tv_sec--; - } - - elapsed.tv_usec = rtimer->end.tv_usec - rtimer->start.tv_usec; - elapsed.tv_sec = rtimer->end.tv_sec - rtimer->start.tv_sec; - - total = elapsed.tv_sec + ((gdouble) elapsed.tv_usec / 1e6); - if (total < 0) - { - total = 0; - - if (microseconds) - *microseconds = 0; - } - else if (microseconds) - *microseconds = elapsed.tv_usec; - -#endif /* !G_OS_WIN32 */ - - return total; -} - -void -g_usleep (gulong microseconds) -{ -#ifdef G_OS_WIN32 - Sleep (microseconds / 1000); -#else /* !G_OS_WIN32 */ -# ifdef HAVE_NANOSLEEP - struct timespec request, remaining; - request.tv_sec = microseconds / G_USEC_PER_SEC; - request.tv_nsec = 1000 * (microseconds % G_USEC_PER_SEC); - while (nanosleep (&request, &remaining) == EINTR) - request = remaining; -# else /* !HAVE_NANOSLEEP */ - if (g_thread_supported ()) - { - static GStaticMutex mutex = G_STATIC_MUTEX_INIT; - static GCond* cond = NULL; - GTimeVal end_time; - - g_get_current_time (&end_time); - if (microseconds > G_MAXLONG) - { - microseconds -= G_MAXLONG; - g_time_val_add (&end_time, G_MAXLONG); - } - g_time_val_add (&end_time, microseconds); - - g_static_mutex_lock (&mutex); - - if (!cond) - cond = g_cond_new (); - - while (g_cond_timed_wait (cond, g_static_mutex_get_mutex (&mutex), - &end_time)) - /* do nothing */; - - g_static_mutex_unlock (&mutex); - } - else - { - struct timeval tv; - tv.tv_sec = microseconds / G_USEC_PER_SEC; - tv.tv_usec = microseconds % G_USEC_PER_SEC; - select(0, NULL, NULL, NULL, &tv); - } -# endif /* !HAVE_NANOSLEEP */ -#endif /* !G_OS_WIN32 */ -} - -/** - * g_time_val_add: - * @time: a #GTimeVal - * @microseconds: number of microseconds to add to @time - * - * Adds the given number of microseconds to @time. @microseconds can - * also be negative to decrease the value of @time. - **/ -void -g_time_val_add (GTimeVal *time, glong microseconds) -{ - g_return_if_fail (time->tv_usec >= 0 && time->tv_usec < G_USEC_PER_SEC); - - if (microseconds >= 0) - { - time->tv_usec += microseconds % G_USEC_PER_SEC; - time->tv_sec += microseconds / G_USEC_PER_SEC; - if (time->tv_usec >= G_USEC_PER_SEC) - { - time->tv_usec -= G_USEC_PER_SEC; - time->tv_sec++; - } - } - else - { - microseconds *= -1; - time->tv_usec -= microseconds % G_USEC_PER_SEC; - time->tv_sec -= microseconds / G_USEC_PER_SEC; - if (time->tv_usec < 0) - { - time->tv_usec += G_USEC_PER_SEC; - time->tv_sec--; - } - } -} diff --git a/gtimer.h b/gtimer.h deleted file mode 100644 index 823d63442..000000000 --- a/gtimer.h +++ /dev/null @@ -1,57 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_TIMER_H__ -#define __G_TIMER_H__ - -#include <gtypes.h> - -G_BEGIN_DECLS - -/* Timer - */ - -/* microseconds per second */ -typedef struct _GTimer GTimer; - -#define G_USEC_PER_SEC 1000000 - -GTimer* g_timer_new (void); -void g_timer_destroy (GTimer *timer); -void g_timer_start (GTimer *timer); -void g_timer_stop (GTimer *timer); -void g_timer_reset (GTimer *timer); -gdouble g_timer_elapsed (GTimer *timer, - gulong *microseconds); - -void g_usleep (gulong microseconds); - -void g_time_val_add (GTimeVal *time, - glong microseconds); - -G_END_DECLS - -#endif /* __G_TIMER_H__ */ diff --git a/gtree.c b/gtree.c deleted file mode 100644 index 24a99d20e..000000000 --- a/gtree.c +++ /dev/null @@ -1,1117 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glib.h" - - -typedef struct _GRealTree GRealTree; -typedef struct _GTreeNode GTreeNode; - -struct _GRealTree -{ - GTreeNode *root; - GCompareDataFunc key_compare; - GDestroyNotify key_destroy_func; - GDestroyNotify value_destroy_func; - gpointer key_compare_data; -}; - -struct _GTreeNode -{ - gint balance; /* height (left) - height (right) */ - GTreeNode *left; /* left subtree */ - GTreeNode *right; /* right subtree */ - gpointer key; /* key for this node */ - gpointer value; /* value stored at this node */ -}; - - -static GTreeNode* g_tree_node_new (gpointer key, - gpointer value); -static void g_tree_node_destroy (GTreeNode *node, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func); -static GTreeNode* g_tree_node_insert (GTree *tree, - GTreeNode *node, - gpointer key, - gpointer value, - gboolean replace, - gboolean *inserted); -static GTreeNode* g_tree_node_remove (GTree *tree, - GTreeNode *node, - gconstpointer key, - gboolean notify); -static GTreeNode* g_tree_node_balance (GTreeNode *node); -static GTreeNode* g_tree_node_remove_leftmost (GTreeNode *node, - GTreeNode **leftmost); -static GTreeNode* g_tree_node_restore_left_balance (GTreeNode *node, - gint old_balance); -static GTreeNode* g_tree_node_restore_right_balance (GTreeNode *node, - gint old_balance); -static GTreeNode* g_tree_node_lookup (GTreeNode *node, - GCompareDataFunc compare, - gpointer comp_data, - gconstpointer key); -static gint g_tree_node_count (GTreeNode *node); -static gint g_tree_node_pre_order (GTreeNode *node, - GTraverseFunc traverse_func, - gpointer data); -static gint g_tree_node_in_order (GTreeNode *node, - GTraverseFunc traverse_func, - gpointer data); -static gint g_tree_node_post_order (GTreeNode *node, - GTraverseFunc traverse_func, - gpointer data); -static gpointer g_tree_node_search (GTreeNode *node, - GCompareFunc search_func, - gconstpointer data); -static gint g_tree_node_height (GTreeNode *node); -static GTreeNode* g_tree_node_rotate_left (GTreeNode *node); -static GTreeNode* g_tree_node_rotate_right (GTreeNode *node); -static void g_tree_node_check (GTreeNode *node); - - -G_LOCK_DEFINE_STATIC (g_tree_global); -static GMemChunk *node_mem_chunk = NULL; -static GTreeNode *node_free_list = NULL; - - -static GTreeNode* -g_tree_node_new (gpointer key, - gpointer value) -{ - GTreeNode *node; - - G_LOCK (g_tree_global); - if (node_free_list) - { - node = node_free_list; - node_free_list = node->right; - } - else - { - if (!node_mem_chunk) - node_mem_chunk = g_mem_chunk_new ("GLib GTreeNode mem chunk", - sizeof (GTreeNode), - 1024, - G_ALLOC_ONLY); - - node = g_chunk_new (GTreeNode, node_mem_chunk); - } - G_UNLOCK (g_tree_global); - - node->balance = 0; - node->left = NULL; - node->right = NULL; - node->key = key; - node->value = value; - - return node; -} - -static void -g_tree_node_destroy (GTreeNode *node, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func) -{ - if (node) - { - g_tree_node_destroy (node->right, - key_destroy_func, value_destroy_func); - g_tree_node_destroy (node->left, - key_destroy_func, value_destroy_func); - - if (key_destroy_func) - key_destroy_func (node->key); - if (value_destroy_func) - value_destroy_func (node->value); - -#ifdef ENABLE_GC_FRIENDLY - node->left = NULL; - node->key = NULL; - node->value = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - G_LOCK (g_tree_global); - node->right = node_free_list; - node_free_list = node; - G_UNLOCK (g_tree_global); - } -} - -/** - * g_tree_new: - * @key_compare_func: the function used to order the nodes in the #GTree. - * It should return values similar to the standard - * <function>strcmp()</function> function - - * 0 if the two arguments are equal, a negative value if the first argument - * comes before the second, or a positive value if the first argument comes - * after the second. - * - * Creates a new #GTree. - * - * Return value: a new #GTree. - **/ -GTree* -g_tree_new (GCompareFunc key_compare_func) -{ - g_return_val_if_fail (key_compare_func != NULL, NULL); - - return g_tree_new_full ((GCompareDataFunc) key_compare_func, NULL, - NULL, NULL); -} - -/** - * g_tree_new_with_data: - * @key_compare_func: qsort()-style comparison function. - * @key_compare_data: data to pass to comparison function. - * - * Creates a new #GTree with a comparison function that accepts user data. - * See g_tree_new() for more details. - * - * Return value: a new #GTree. - **/ -GTree* -g_tree_new_with_data (GCompareDataFunc key_compare_func, - gpointer key_compare_data) -{ - g_return_val_if_fail (key_compare_func != NULL, NULL); - - return g_tree_new_full (key_compare_func, key_compare_data, - NULL, NULL); -} - -/** - * g_tree_new_full: - * @key_compare_func: qsort()-style comparison function. - * @key_compare_data: data to pass to comparison function. - * @key_destroy_func: a function to free the memory allocated for the key - * used when removing the entry from the #GTree or #NULL if you don't - * want to supply such a function. - * @value_destroy_func: a function to free the memory allocated for the - * value used when removing the entry from the #GTree or #NULL if you - * don't want to supply such a function. - * - * Creates a new #GTree like g_tree_new() and allows to specify functions - * to free the memory allocated for the key and value that get called when - * removing the entry from the #GTree. - * - * Return value: a new #GTree. - **/ -GTree* -g_tree_new_full (GCompareDataFunc key_compare_func, - gpointer key_compare_data, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func) -{ - GRealTree *rtree; - - g_return_val_if_fail (key_compare_func != NULL, NULL); - - rtree = g_new (GRealTree, 1); - rtree->root = NULL; - rtree->key_compare = key_compare_func; - rtree->key_destroy_func = key_destroy_func; - rtree->value_destroy_func = value_destroy_func; - rtree->key_compare_data = key_compare_data; - - return (GTree*) rtree; -} - -/** - * g_tree_destroy: - * @tree: a #GTree. - * - * Destroys the #GTree. If keys and/or values are dynamically allocated, you - * should either free them first or create the #GTree using g_tree_new_full(). - * In the latter case the destroy functions you supplied will be called on - * all keys and values before destroying the #GTree. - **/ -void -g_tree_destroy (GTree *tree) -{ - GRealTree *rtree; - - g_return_if_fail (tree != NULL); - - rtree = (GRealTree*) tree; - - g_tree_node_destroy (rtree->root, - rtree->key_destroy_func, - rtree->value_destroy_func); - - g_free (rtree); -} - -/** - * g_tree_insert: - * @tree: a #Gtree. - * @key: the key to insert. - * @value: the value corresponding to the key. - * - * Inserts a key/value pair into a #GTree. If the given key already exists - * in the #GTree it is set to the new value. If you supplied a - * value_destroy_func when creating the #GTree, the old value is freed using - * that function. If you supplied a key_destroy_func when creating the - * #GTree, the passed key is freed using that function. - * - * The tree is automatically 'balanced' as new key/value pairs are added, - * so that the distance from the root to every leaf is as small as possible. - **/ -void -g_tree_insert (GTree *tree, - gpointer key, - gpointer value) -{ - GRealTree *rtree; - gboolean inserted; - - g_return_if_fail (tree != NULL); - - rtree = (GRealTree*) tree; - - inserted = FALSE; - rtree->root = g_tree_node_insert (tree, - rtree->root, - key, value, - FALSE, &inserted); -} - -/** - * g_tree_replace: - * @tree: a #Gtree. - * @key: the key to insert. - * @value: the value corresponding to the key. - * - * Inserts a new key and value into a #GTree similar to g_tree_insert(). - * The difference is that if the key already exists in the #GTree, it gets - * replaced by the new key. If you supplied a value_destroy_func when - * creating the #GTree, the old value is freed using that function. If you - * supplied a key_destroy_func when creating the #GTree, the old key is - * freed using that function. - * - * The tree is automatically 'balanced' as new key/value pairs are added, - * so that the distance from the root to every leaf is as small as possible. - **/ -void -g_tree_replace (GTree *tree, - gpointer key, - gpointer value) -{ - GRealTree *rtree; - gboolean inserted; - - g_return_if_fail (tree != NULL); - - rtree = (GRealTree*) tree; - - inserted = FALSE; - rtree->root = g_tree_node_insert (tree, - rtree->root, - key, value, - TRUE, &inserted); -} - -/** - * g_tree_remove: - * @tree: a #Gtree. - * @key: the key to remove. - * - * Removes a key/value pair from a #GTree. - * - * If the #GTree was created using g_tree_new_full(), the key and value - * are freed using the supplied destroy_functions, otherwise you have to - * make sure that any dynamically allocated values are freed yourself. - **/ -void -g_tree_remove (GTree *tree, - gconstpointer key) -{ - GRealTree *rtree; - - g_return_if_fail (tree != NULL); - - rtree = (GRealTree*) tree; - - rtree->root = g_tree_node_remove (tree, rtree->root, key, TRUE); -} - -/** - * g_tree_steal: - * @tree: a #Gtree. - * @key: the key to remove. - * - * Removes a key and its associated value from a #GTree without calling - * the key and value destroy functions. - **/ -void -g_tree_steal (GTree *tree, - gconstpointer key) -{ - GRealTree *rtree; - - g_return_if_fail (tree != NULL); - - rtree = (GRealTree*) tree; - - rtree->root = g_tree_node_remove (tree, rtree->root, key, FALSE); -} - -/** - * g_tree_lookup: - * @tree: a #GTree. - * @key: the key to look up. - * - * Gets the value corresponding to the given key. Since a #GTree is - * automatically balanced as key/value pairs are added, key lookup is very - * fast. - * - * Return value: the value corresponding to the key. - **/ -gpointer -g_tree_lookup (GTree *tree, - gconstpointer key) -{ - GRealTree *rtree; - GTreeNode *node; - - g_return_val_if_fail (tree != NULL, NULL); - - rtree = (GRealTree*) tree; - - node = g_tree_node_lookup (rtree->root, - rtree->key_compare, rtree->key_compare_data, key); - - return node ? node->value : NULL; -} - -/** - * g_tree_lookup_extended: - * @tree: a #GTree. - * @lookup_key: the key to look up. - * @orig_key: returns the original key. - * @value: returns the value associated with the key. - * - * Looks up a key in the #GTree, returning the original key and the - * associated value and a gboolean which is TRUE if the key was found. This - * is useful if you need to free the memory allocated for the original key, - * for example before calling g_tree_remove(). - * - * Return value: #TRUE if the key was found in the #GTree. - **/ -gboolean -g_tree_lookup_extended (GTree *tree, - gconstpointer lookup_key, - gpointer *orig_key, - gpointer *value) -{ - GRealTree *rtree; - GTreeNode *node; - - g_return_val_if_fail (tree != NULL, FALSE); - - rtree = (GRealTree*) tree; - - node = g_tree_node_lookup (rtree->root, - rtree->key_compare, rtree->key_compare_data, lookup_key); - - if (node) - { - if (orig_key) - *orig_key = node->key; - if (value) - *value = node->value; - return TRUE; - } - else - return FALSE; -} - -/** - * g_tree_foreach: - * @tree: a #GTree. - * @func: the function to call for each node visited. If this function - * returns TRUE, the traversal is stopped. - * @user_data: user data to pass to the function. - * - * Calls the given function for each of the key/value pairs in the #GTree. - * The function is passed the key and value of each pair, and the given - * @data parameter. - **/ -void -g_tree_foreach (GTree *tree, - GTraverseFunc func, - gpointer user_data) -{ - GRealTree *rtree; - - g_return_if_fail (tree != NULL); - - rtree = (GRealTree*) tree; - - if (!rtree->root) - return; - - g_tree_node_in_order (rtree->root, func, user_data); -} - -/** - * g_tree_traverse: - * @tree: a #GTree. - * @traverse_func: the function to call for each node visited. If this - * function returns TRUE, the traversal is stopped. - * @traverse_type: the order in which nodes are visited, one of %G_IN_ORDER, - * %G_PRE_ORDER and %G_POST_ORDER. - * @user_data: user data to pass to the function. - * - * Calls the given function for each node in the GTree. This function is - * deprecated, use g_tree_foreach() instead. - **/ -void -g_tree_traverse (GTree *tree, - GTraverseFunc traverse_func, - GTraverseType traverse_type, - gpointer user_data) -{ - GRealTree *rtree; - - g_return_if_fail (tree != NULL); - - rtree = (GRealTree*) tree; - - if (!rtree->root) - return; - - switch (traverse_type) - { - case G_PRE_ORDER: - g_tree_node_pre_order (rtree->root, traverse_func, user_data); - break; - - case G_IN_ORDER: - g_tree_node_in_order (rtree->root, traverse_func, user_data); - break; - - case G_POST_ORDER: - g_tree_node_post_order (rtree->root, traverse_func, user_data); - break; - - case G_LEVEL_ORDER: - g_warning ("g_tree_traverse(): traverse type G_LEVEL_ORDER isn't implemented."); - break; - } -} - -/** - * g_tree_search: - * @tree: a #GTree. - * @search_func: the comparison function used to search the #GTree. - * @user_data: the data passed as the second argument to the @search_func - * function. - * - * Searches a #GTree using an alternative form of the comparison function. - * - * This function is not as useful as it sounds. - * It allows you to use a different function for performing the lookup of - * a key. However, since the tree is ordered according to the @key_compare_func - * function passed to g_tree_new(), the function you pass to g_tree_search() - * must return exactly the same value as would be returned by the comparison - * function, for each pair of tree nodes, or the search will not work. - * - * To search for a specific value, you can use g_tree_foreach() or - * g_tree_traverse(). - * - * Return value: the value corresponding to the found key, or NULL if the key - * is not found. - **/ -gpointer -g_tree_search (GTree *tree, - GCompareFunc search_func, - gconstpointer user_data) -{ - GRealTree *rtree; - - g_return_val_if_fail (tree != NULL, NULL); - - rtree = (GRealTree*) tree; - - if (rtree->root) - return g_tree_node_search (rtree->root, search_func, user_data); - else - return NULL; -} - -/** - * g_tree_height: - * @tree: a #GTree. - * - * Gets the height of a #GTree. - * - * If the #GTree contains no nodes, the height is 0. - * If the #GTree contains only one root node the height is 1. - * If the root node has children the height is 2, etc. - * - * Return value: the height of the #GTree. - **/ -gint -g_tree_height (GTree *tree) -{ - GRealTree *rtree; - - g_return_val_if_fail (tree != NULL, 0); - - rtree = (GRealTree*) tree; - - if (rtree->root) - return g_tree_node_height (rtree->root); - else - return 0; -} - -/** - * g_tree_nnodes: - * @tree: a #GTree. - * - * Gets the number of nodes in a #GTree. - * - * Return value: the number of nodes in the #GTree. - **/ -gint -g_tree_nnodes (GTree *tree) -{ - GRealTree *rtree; - - g_return_val_if_fail (tree != NULL, 0); - - rtree = (GRealTree*) tree; - - if (rtree->root) - return g_tree_node_count (rtree->root); - else - return 0; -} - -static GTreeNode* -g_tree_node_insert (GTree *tree, - GTreeNode *node, - gpointer key, - gpointer value, - gboolean replace, - gboolean *inserted) -{ - GRealTree *rtree; - gint old_balance; - gint cmp; - - rtree = (GRealTree*) tree; - - if (!node) - { - *inserted = TRUE; - return g_tree_node_new (key, value); - } - - cmp = rtree->key_compare (key, node->key, rtree->key_compare_data); - if (cmp == 0) - { - *inserted = FALSE; - - if (rtree->value_destroy_func) - rtree->value_destroy_func (node->value); - - node->value = value; - - if (replace) - { - if (rtree->key_destroy_func) - rtree->key_destroy_func (node->key); - - node->key = key; - } - else - { - /* free the passed key */ - if (rtree->key_destroy_func) - rtree->key_destroy_func (key); - } - - return node; - } - - if (cmp < 0) - { - if (node->left) - { - old_balance = node->left->balance; - node->left = g_tree_node_insert (tree, - node->left, - key, value, - replace, inserted); - - if ((old_balance != node->left->balance) && node->left->balance) - node->balance -= 1; - } - else - { - *inserted = TRUE; - node->left = g_tree_node_new (key, value); - node->balance -= 1; - } - } - else if (cmp > 0) - { - if (node->right) - { - old_balance = node->right->balance; - node->right = g_tree_node_insert (tree, - node->right, - key, value, - replace, inserted); - - if ((old_balance != node->right->balance) && node->right->balance) - node->balance += 1; - } - else - { - *inserted = TRUE; - node->right = g_tree_node_new (key, value); - node->balance += 1; - } - } - - if (*inserted) - { - if ((node->balance < -1) || (node->balance > 1)) - node = g_tree_node_balance (node); - } - - return node; -} - -static GTreeNode* -g_tree_node_remove (GTree *tree, - GTreeNode *node, - gconstpointer key, - gboolean notify) -{ - GRealTree *rtree; - GTreeNode *new_root; - gint old_balance; - gint cmp; - - if (!node) - return NULL; - - rtree = (GRealTree *) tree; - - cmp = rtree->key_compare (key, node->key, rtree->key_compare_data); - if (cmp == 0) - { - GTreeNode *garbage; - - garbage = node; - - if (!node->right) - { - node = node->left; - } - else - { - old_balance = node->right->balance; - node->right = g_tree_node_remove_leftmost (node->right, &new_root); - new_root->left = node->left; - new_root->right = node->right; - new_root->balance = node->balance; - node = g_tree_node_restore_right_balance (new_root, old_balance); - } - - if (notify) - { - if (rtree->key_destroy_func) - rtree->key_destroy_func (garbage->key); - if (rtree->value_destroy_func) - rtree->value_destroy_func (garbage->value); - } - -#ifdef ENABLE_GC_FRIENDLY - garbage->left = NULL; - garbage->key = NULL; - garbage->value = NULL; -#endif /* ENABLE_GC_FRIENDLY */ - - G_LOCK (g_tree_global); - garbage->right = node_free_list; - node_free_list = garbage; - G_UNLOCK (g_tree_global); - } - else if (cmp < 0) - { - if (node->left) - { - old_balance = node->left->balance; - node->left = g_tree_node_remove (tree, node->left, key, notify); - node = g_tree_node_restore_left_balance (node, old_balance); - } - } - else if (cmp > 0) - { - if (node->right) - { - old_balance = node->right->balance; - node->right = g_tree_node_remove (tree, node->right, key, notify); - node = g_tree_node_restore_right_balance (node, old_balance); - } - } - - return node; -} - -static GTreeNode* -g_tree_node_balance (GTreeNode *node) -{ - if (node->balance < -1) - { - if (node->left->balance > 0) - node->left = g_tree_node_rotate_left (node->left); - node = g_tree_node_rotate_right (node); - } - else if (node->balance > 1) - { - if (node->right->balance < 0) - node->right = g_tree_node_rotate_right (node->right); - node = g_tree_node_rotate_left (node); - } - - return node; -} - -static GTreeNode* -g_tree_node_remove_leftmost (GTreeNode *node, - GTreeNode **leftmost) -{ - gint old_balance; - - if (!node->left) - { - *leftmost = node; - return node->right; - } - - old_balance = node->left->balance; - node->left = g_tree_node_remove_leftmost (node->left, leftmost); - return g_tree_node_restore_left_balance (node, old_balance); -} - -static GTreeNode* -g_tree_node_restore_left_balance (GTreeNode *node, - gint old_balance) -{ - if (!node->left) - node->balance += 1; - else if ((node->left->balance != old_balance) && - (node->left->balance == 0)) - node->balance += 1; - - if (node->balance > 1) - return g_tree_node_balance (node); - return node; -} - -static GTreeNode* -g_tree_node_restore_right_balance (GTreeNode *node, - gint old_balance) -{ - if (!node->right) - node->balance -= 1; - else if ((node->right->balance != old_balance) && - (node->right->balance == 0)) - node->balance -= 1; - - if (node->balance < -1) - return g_tree_node_balance (node); - return node; -} - -static GTreeNode * -g_tree_node_lookup (GTreeNode *node, - GCompareDataFunc compare, - gpointer compare_data, - gconstpointer key) -{ - gint cmp; - - if (!node) - return NULL; - - cmp = (* compare) (key, node->key, compare_data); - if (cmp == 0) - return node; - - if (cmp < 0) - { - if (node->left) - return g_tree_node_lookup (node->left, compare, compare_data, key); - } - else if (cmp > 0) - { - if (node->right) - return g_tree_node_lookup (node->right, compare, compare_data, key); - } - - return NULL; -} - -static gint -g_tree_node_count (GTreeNode *node) -{ - gint count; - - count = 1; - if (node->left) - count += g_tree_node_count (node->left); - if (node->right) - count += g_tree_node_count (node->right); - - return count; -} - -static gint -g_tree_node_pre_order (GTreeNode *node, - GTraverseFunc traverse_func, - gpointer data) -{ - if ((*traverse_func) (node->key, node->value, data)) - return TRUE; - if (node->left) - { - if (g_tree_node_pre_order (node->left, traverse_func, data)) - return TRUE; - } - if (node->right) - { - if (g_tree_node_pre_order (node->right, traverse_func, data)) - return TRUE; - } - - return FALSE; -} - -static gint -g_tree_node_in_order (GTreeNode *node, - GTraverseFunc traverse_func, - gpointer data) -{ - if (node->left) - { - if (g_tree_node_in_order (node->left, traverse_func, data)) - return TRUE; - } - if ((*traverse_func) (node->key, node->value, data)) - return TRUE; - if (node->right) - { - if (g_tree_node_in_order (node->right, traverse_func, data)) - return TRUE; - } - - return FALSE; -} - -static gint -g_tree_node_post_order (GTreeNode *node, - GTraverseFunc traverse_func, - gpointer data) -{ - if (node->left) - { - if (g_tree_node_post_order (node->left, traverse_func, data)) - return TRUE; - } - if (node->right) - { - if (g_tree_node_post_order (node->right, traverse_func, data)) - return TRUE; - } - if ((*traverse_func) (node->key, node->value, data)) - return TRUE; - - return FALSE; -} - -static gpointer -g_tree_node_search (GTreeNode *node, - GCompareFunc search_func, - gconstpointer data) -{ - gint dir; - - if (!node) - return NULL; - - do { - dir = (* search_func) (node->key, data); - if (dir == 0) - return node->value; - - if (dir < 0) - node = node->left; - else if (dir > 0) - node = node->right; - } while (node); - - return NULL; -} - -static gint -g_tree_node_height (GTreeNode *node) -{ - gint left_height; - gint right_height; - - if (node) - { - left_height = 0; - right_height = 0; - - if (node->left) - left_height = g_tree_node_height (node->left); - - if (node->right) - right_height = g_tree_node_height (node->right); - - return MAX (left_height, right_height) + 1; - } - - return 0; -} - -static GTreeNode* -g_tree_node_rotate_left (GTreeNode *node) -{ - GTreeNode *right; - gint a_bal; - gint b_bal; - - right = node->right; - - node->right = right->left; - right->left = node; - - a_bal = node->balance; - b_bal = right->balance; - - if (b_bal <= 0) - { - if (a_bal >= 1) - right->balance = b_bal - 1; - else - right->balance = a_bal + b_bal - 2; - node->balance = a_bal - 1; - } - else - { - if (a_bal <= b_bal) - right->balance = a_bal - 2; - else - right->balance = b_bal - 1; - node->balance = a_bal - b_bal - 1; - } - - return right; -} - -static GTreeNode* -g_tree_node_rotate_right (GTreeNode *node) -{ - GTreeNode *left; - gint a_bal; - gint b_bal; - - left = node->left; - - node->left = left->right; - left->right = node; - - a_bal = node->balance; - b_bal = left->balance; - - if (b_bal <= 0) - { - if (b_bal > a_bal) - left->balance = b_bal + 1; - else - left->balance = a_bal + 2; - node->balance = a_bal - b_bal + 1; - } - else - { - if (a_bal <= -1) - left->balance = b_bal + 1; - else - left->balance = a_bal + b_bal + 2; - node->balance = a_bal + 1; - } - - return left; -} - -static void -g_tree_node_check (GTreeNode *node) -{ - gint left_height; - gint right_height; - gint balance; - - if (node) - { - left_height = 0; - right_height = 0; - - if (node->left) - left_height = g_tree_node_height (node->left); - if (node->right) - right_height = g_tree_node_height (node->right); - - balance = right_height - left_height; - if (balance != node->balance) - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, - "g_tree_node_check: failed: %d ( %d )\n", - balance, node->balance); - - if (node->left) - g_tree_node_check (node->left); - if (node->right) - g_tree_node_check (node->right); - } -} diff --git a/gtree.h b/gtree.h deleted file mode 100644 index 401120bbc..000000000 --- a/gtree.h +++ /dev/null @@ -1,84 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_TREE_H__ -#define __G_TREE_H__ - -#include <gnode.h> - -G_BEGIN_DECLS - -typedef struct _GTree GTree; - -typedef gint (*GTraverseFunc) (gpointer key, - gpointer value, - gpointer data); - -/* Balanced binary trees - */ -GTree* g_tree_new (GCompareFunc key_compare_func); -GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func, - gpointer key_compare_data); -GTree* g_tree_new_full (GCompareDataFunc key_compare_func, - gpointer key_compare_data, - GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func); -void g_tree_destroy (GTree *tree); -void g_tree_insert (GTree *tree, - gpointer key, - gpointer value); -void g_tree_replace (GTree *tree, - gpointer key, - gpointer value); -void g_tree_remove (GTree *tree, - gconstpointer key); -void g_tree_steal (GTree *tree, - gconstpointer key); -gpointer g_tree_lookup (GTree *tree, - gconstpointer key); -gboolean g_tree_lookup_extended (GTree *tree, - gconstpointer lookup_key, - gpointer *orig_key, - gpointer *value); -void g_tree_foreach (GTree *tree, - GTraverseFunc func, - gpointer user_data); -void g_tree_traverse (GTree *tree, - GTraverseFunc traverse_func, - GTraverseType traverse_type, - gpointer user_data); -gpointer g_tree_search (GTree *tree, - GCompareFunc search_func, - gconstpointer user_data); -gint g_tree_height (GTree *tree); -gint g_tree_nnodes (GTree *tree); - - - -G_END_DECLS - -#endif /* __G_TREE_H__ */ - diff --git a/gtypes.h b/gtypes.h deleted file mode 100644 index eec6fa42a..000000000 --- a/gtypes.h +++ /dev/null @@ -1,350 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_TYPES_H__ -#define __G_TYPES_H__ - -#include <glibconfig.h> - -G_BEGIN_DECLS - -/* Provide type definitions for commonly used types. - * These are useful because a "gint8" can be adjusted - * to be 1 byte (8 bits) on all platforms. Similarly and - * more importantly, "gint32" can be adjusted to be - * 4 bytes (32 bits) on all platforms. - */ - -typedef char gchar; -typedef short gshort; -typedef long glong; -typedef int gint; -typedef gint gboolean; - -typedef unsigned char guchar; -typedef unsigned short gushort; -typedef unsigned long gulong; -typedef unsigned int guint; - -typedef float gfloat; -typedef double gdouble; - -/* HAVE_LONG_DOUBLE doesn't work correctly on all platforms. - * Since gldouble isn't used anywhere, just disable it for now */ - -#if 0 -#ifdef HAVE_LONG_DOUBLE -typedef long double gldouble; -#else /* HAVE_LONG_DOUBLE */ -typedef double gldouble; -#endif /* HAVE_LONG_DOUBLE */ -#endif /* 0 */ - -typedef void* gpointer; -typedef const void *gconstpointer; - -typedef gint (*GCompareFunc) (gconstpointer a, - gconstpointer b); -typedef gint (*GCompareDataFunc) (gconstpointer a, - gconstpointer b, - gpointer user_data); -typedef gboolean (*GEqualFunc) (gconstpointer a, - gconstpointer b); -typedef void (*GDestroyNotify) (gpointer data); -typedef void (*GFunc) (gpointer data, - gpointer user_data); -typedef guint (*GHashFunc) (gconstpointer key); -typedef void (*GHFunc) (gpointer key, - gpointer value, - gpointer user_data); -typedef void (*GFreeFunc) (gpointer data); - -/* Define some mathematical constants that aren't available - * symbolically in some strict ISO C implementations. - */ -#define G_E 2.7182818284590452354E0 -#define G_LN2 6.9314718055994530942E-1 -#define G_LN10 2.3025850929940456840E0 -#define G_PI 3.14159265358979323846E0 -#define G_PI_2 1.57079632679489661923E0 -#define G_PI_4 0.78539816339744830962E0 -#define G_SQRT2 1.4142135623730950488E0 - -/* Portable endian checks and conversions - * - * glibconfig.h defines G_BYTE_ORDER which expands to one of - * the below macros. - */ -#define G_LITTLE_ENDIAN 1234 -#define G_BIG_ENDIAN 4321 -#define G_PDP_ENDIAN 3412 /* unused, need specific PDP check */ - - -/* Basic bit swapping functions - */ -#define GUINT16_SWAP_LE_BE_CONSTANT(val) ((guint16) ( \ - (((guint16) (val) & (guint16) 0x00ffU) << 8) | \ - (((guint16) (val) & (guint16) 0xff00U) >> 8))) -#define GUINT32_SWAP_LE_BE_CONSTANT(val) ((guint32) ( \ - (((guint32) (val) & (guint32) 0x000000ffU) << 24) | \ - (((guint32) (val) & (guint32) 0x0000ff00U) << 8) | \ - (((guint32) (val) & (guint32) 0x00ff0000U) >> 8) | \ - (((guint32) (val) & (guint32) 0xff000000U) >> 24))) - -/* Intel specific stuff for speed - */ -#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 -# define GUINT16_SWAP_LE_BE_X86(val) \ - (__extension__ \ - ({ register guint16 __v; \ - if (__builtin_constant_p (val)) \ - __v = GUINT16_SWAP_LE_BE_CONSTANT (val); \ - else \ - __asm__ __const__ ("rorw $8, %w0" \ - : "=r" (__v) \ - : "0" ((guint16) (val))); \ - __v; })) -# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_X86 (val)) -# if !defined(__i486__) && !defined(__i586__) \ - && !defined(__pentium__) && !defined(__i686__) && !defined(__pentiumpro__) -# define GUINT32_SWAP_LE_BE_X86(val) \ - (__extension__ \ - ({ register guint32 __v; \ - if (__builtin_constant_p (val)) \ - __v = GUINT32_SWAP_LE_BE_CONSTANT (val); \ - else \ - __asm__ __const__ ("rorw $8, %w0\n\t" \ - "rorl $16, %0\n\t" \ - "rorw $8, %w0" \ - : "=r" (__v) \ - : "0" ((guint32) (val))); \ - __v; })) -# else /* 486 and higher has bswap */ -# define GUINT32_SWAP_LE_BE_X86(val) \ - (__extension__ \ - ({ register guint32 __v; \ - if (__builtin_constant_p (val)) \ - __v = GUINT32_SWAP_LE_BE_CONSTANT (val); \ - else \ - __asm__ __const__ ("bswap %0" \ - : "=r" (__v) \ - : "0" ((guint32) (val))); \ - __v; })) -# endif /* processor specific 32-bit stuff */ -# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_X86 (val)) -#else /* !__i386__ */ -# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) -# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val)) -#endif /* __i386__ */ - -#ifdef G_HAVE_GINT64 -# define GUINT64_SWAP_LE_BE_CONSTANT(val) ((guint64) ( \ - (((guint64) (val) & \ - (guint64) G_GINT64_CONSTANT(0x00000000000000ffU)) << 56) | \ - (((guint64) (val) & \ - (guint64) G_GINT64_CONSTANT(0x000000000000ff00U)) << 40) | \ - (((guint64) (val) & \ - (guint64) G_GINT64_CONSTANT(0x0000000000ff0000U)) << 24) | \ - (((guint64) (val) & \ - (guint64) G_GINT64_CONSTANT(0x00000000ff000000U)) << 8) | \ - (((guint64) (val) & \ - (guint64) G_GINT64_CONSTANT(0x000000ff00000000U)) >> 8) | \ - (((guint64) (val) & \ - (guint64) G_GINT64_CONSTANT(0x0000ff0000000000U)) >> 24) | \ - (((guint64) (val) & \ - (guint64) G_GINT64_CONSTANT(0x00ff000000000000U)) >> 40) | \ - (((guint64) (val) & \ - (guint64) G_GINT64_CONSTANT(0xff00000000000000U)) >> 56))) -# if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 -# define GUINT64_SWAP_LE_BE_X86(val) \ - (__extension__ \ - ({ union { guint64 __ll; \ - guint32 __l[2]; } __r; \ - if (__builtin_constant_p (val)) \ - __r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (val); \ - else \ - { \ - union { guint64 __ll; \ - guint32 __l[2]; } __w; \ - __w.__ll = ((guint64) val); \ - __r.__l[0] = GUINT32_SWAP_LE_BE (__w.__l[1]); \ - __r.__l[1] = GUINT32_SWAP_LE_BE (__w.__l[0]); \ - } \ - __r.__ll; })) -# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_X86 (val)) -# else /* !__i386__ */ -# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT(val)) -# endif -#endif - -#define GUINT16_SWAP_LE_PDP(val) ((guint16) (val)) -#define GUINT16_SWAP_BE_PDP(val) (GUINT16_SWAP_LE_BE (val)) -#define GUINT32_SWAP_LE_PDP(val) ((guint32) ( \ - (((guint32) (val) & (guint32) 0x0000ffffU) << 16) | \ - (((guint32) (val) & (guint32) 0xffff0000U) >> 16))) -#define GUINT32_SWAP_BE_PDP(val) ((guint32) ( \ - (((guint32) (val) & (guint32) 0x00ff00ffU) << 8) | \ - (((guint32) (val) & (guint32) 0xff00ff00U) >> 8))) - -/* The G*_TO_?E() macros are defined in glibconfig.h. - * The transformation is symmetric, so the FROM just maps to the TO. - */ -#define GINT16_FROM_LE(val) (GINT16_TO_LE (val)) -#define GUINT16_FROM_LE(val) (GUINT16_TO_LE (val)) -#define GINT16_FROM_BE(val) (GINT16_TO_BE (val)) -#define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val)) -#define GINT32_FROM_LE(val) (GINT32_TO_LE (val)) -#define GUINT32_FROM_LE(val) (GUINT32_TO_LE (val)) -#define GINT32_FROM_BE(val) (GINT32_TO_BE (val)) -#define GUINT32_FROM_BE(val) (GUINT32_TO_BE (val)) - -#ifdef G_HAVE_GINT64 -#define GINT64_FROM_LE(val) (GINT64_TO_LE (val)) -#define GUINT64_FROM_LE(val) (GUINT64_TO_LE (val)) -#define GINT64_FROM_BE(val) (GINT64_TO_BE (val)) -#define GUINT64_FROM_BE(val) (GUINT64_TO_BE (val)) -#endif - -#define GLONG_FROM_LE(val) (GLONG_TO_LE (val)) -#define GULONG_FROM_LE(val) (GULONG_TO_LE (val)) -#define GLONG_FROM_BE(val) (GLONG_TO_BE (val)) -#define GULONG_FROM_BE(val) (GULONG_TO_BE (val)) - -#define GINT_FROM_LE(val) (GINT_TO_LE (val)) -#define GUINT_FROM_LE(val) (GUINT_TO_LE (val)) -#define GINT_FROM_BE(val) (GINT_TO_BE (val)) -#define GUINT_FROM_BE(val) (GUINT_TO_BE (val)) - - -/* Portable versions of host-network order stuff - */ -#define g_ntohl(val) (GUINT32_FROM_BE (val)) -#define g_ntohs(val) (GUINT16_FROM_BE (val)) -#define g_htonl(val) (GUINT32_TO_BE (val)) -#define g_htons(val) (GUINT16_TO_BE (val)) - -/* IEEE Standard 754 Single Precision Storage Format (gfloat): - * - * 31 30 23 22 0 - * +--------+---------------+---------------+ - * | s 1bit | e[30:23] 8bit | f[22:0] 23bit | - * +--------+---------------+---------------+ - * B0------------------->B1------->B2-->B3--> - * - * IEEE Standard 754 Double Precision Storage Format (gdouble): - * - * 63 62 52 51 32 31 0 - * +--------+----------------+----------------+ +---------------+ - * | s 1bit | e[62:52] 11bit | f[51:32] 20bit | | f[31:0] 32bit | - * +--------+----------------+----------------+ +---------------+ - * B0--------------->B1---------->B2--->B3----> B4->B5->B6->B7-> - */ -/* subtract from biased_exponent to form base2 exponent (normal numbers) */ -typedef union _GDoubleIEEE754 GDoubleIEEE754; -typedef union _GFloatIEEE754 GFloatIEEE754; -#define G_IEEE754_FLOAT_BIAS (127) -#define G_IEEE754_DOUBLE_BIAS (1023) -/* multiply with base2 exponent to get base10 exponent (nomal numbers) */ -#define G_LOG_2_BASE_10 (0.30102999566398119521) -#if G_BYTE_ORDER == G_LITTLE_ENDIAN -union _GFloatIEEE754 -{ - gfloat v_float; - struct { - guint mantissa : 23; - guint biased_exponent : 8; - guint sign : 1; - } mpn; -}; -union _GDoubleIEEE754 -{ - gdouble v_double; - struct { - guint mantissa_low : 32; - guint mantissa_high : 20; - guint biased_exponent : 11; - guint sign : 1; - } mpn; -}; -#elif G_BYTE_ORDER == G_BIG_ENDIAN -union _GFloatIEEE754 -{ - gfloat v_float; - struct { - guint sign : 1; - guint biased_exponent : 8; - guint mantissa : 23; - } mpn; -}; -union _GDoubleIEEE754 -{ - gdouble v_double; - struct { - guint sign : 1; - guint biased_exponent : 11; - guint mantissa_high : 20; - guint mantissa_low : 32; - } mpn; -}; -#else /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ -#error unknown ENDIAN type -#endif /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ - -typedef struct _GTimeVal GTimeVal; - -struct _GTimeVal -{ - glong tv_sec; - glong tv_usec; -}; - -G_END_DECLS - -/* We prefix variable declarations so they can - * properly get exported in windows dlls. - */ -#ifndef GLIB_VAR -# ifdef G_PLATFORM_WIN32 -# ifdef GLIB_STATIC_COMPILATION -# define GLIB_VAR extern -# else /* !GLIB_STATIC_COMPILATION */ -# ifdef GLIB_COMPILATION -# ifdef DLL_EXPORT -# define GLIB_VAR __declspec(dllexport) -# else /* !DLL_EXPORT */ -# define GLIB_VAR extern -# endif /* !DLL_EXPORT */ -# else /* !GLIB_COMPILATION */ -# define GLIB_VAR extern __declspec(dllimport) -# endif /* !GLIB_COMPILATION */ -# endif /* !GLIB_STATIC_COMPILATION */ -# else /* !G_PLATFORM_WIN32 */ -# define GLIB_VAR extern -# endif /* !G_PLATFORM_WIN32 */ -#endif /* GLIB_VAR */ - -#endif /* __G_TYPES_H__ */ - diff --git a/gunibreak.c b/gunibreak.c deleted file mode 100644 index 4f3295993..000000000 --- a/gunibreak.c +++ /dev/null @@ -1,55 +0,0 @@ -/* gunibreak.c - line break properties - * - * Copyright 2000 Red Hat, Inc. - * - * The Gnome Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Gnome Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "glib.h" -#include "gunibreak.h" - -#include <config.h> - -#include <stdlib.h> - - -/* We cheat a bit and cast type values to (char *). We detect these - using the &0xff trick. */ -#define TPROP(Page, Char) \ - (((GPOINTER_TO_INT(break_property_table[Page]) & 0xff) == GPOINTER_TO_INT(break_property_table[Page])) \ - ? GPOINTER_TO_INT(break_property_table[Page]) \ - : (break_property_table[Page][Char])) - -#define PROP(Char) (((Char) > (G_UNICODE_LAST_CHAR)) ? G_UNICODE_UNASSIGNED : TPROP ((Char) >> 8, (Char) & 0xff)) - -/** - * g_unichar_break_type: - * @c: a Unicode character - * - * Determines the break type of @c. @c should be a Unicode character - * (to derive a character from UTF-8 encoded text, use - * g_utf8_get_char()). The break type is used to find word and line - * breaks ("text boundaries"), Pango implements the Unicode boundary - * resolution alogorithms and normally you would use a function such - * as pango_break() instead of caring about break types yourself. - * - * Return value: break type - **/ -GUnicodeBreakType -g_unichar_break_type (gunichar c) -{ - return PROP (c); -} diff --git a/gunibreak.h b/gunibreak.h deleted file mode 100644 index 34912b3ad..000000000 --- a/gunibreak.h +++ /dev/null @@ -1,7254 +0,0 @@ -/* This file is automatically generated. DO NOT EDIT! - Instead, edit gen-unicode-tables.pl and re-run. */ - -#ifndef BREAKTABLES_H -#define BREAKTABLES_H - -#define G_UNICODE_DATA_VERSION "3.0.1" - -#define G_UNICODE_LAST_CHAR 0xffff - -static char page0[256] = { - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_LINE_FEED, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_MANDATORY, G_UNICODE_BREAK_CARRIAGE_RETURN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_SPACE, G_UNICODE_BREAK_EXCLAMATION, - G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_QUOTATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_INFIX_SEPARATOR, G_UNICODE_BREAK_HYPHEN, - G_UNICODE_BREAK_INFIX_SEPARATOR, G_UNICODE_BREAK_SYMBOL, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_INFIX_SEPARATOR, - G_UNICODE_BREAK_INFIX_SEPARATOR, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_EXCLAMATION, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_NON_BREAKING_GLUE, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC -}; - -static char page1[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page2[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_BEFORE, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_BEFORE, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page3[256] = { - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page4[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page5[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_INFIX_SEPARATOR, - G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page6[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN -}; - -static char page7[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page9[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page10[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page11[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page12[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page13[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page14[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page15[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_NON_BREAKING_GLUE, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page16[256] = { - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page17[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page18[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page19[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page20[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page22[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page23[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page24[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_BEFORE, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page30[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page31[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN -}; - -static char page32[256] = { - G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_NON_BREAKING_GLUE, - G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_ZERO_WIDTH_SPACE, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_NON_BREAKING_GLUE, G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_BEFORE_AND_AFTER, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_QUOTATION, - G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_QUOTATION, - G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_INSEPARABLE, - G_UNICODE_BREAK_INSEPARABLE, G_UNICODE_BREAK_INSEPARABLE, - G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_MANDATORY, - G_UNICODE_BREAK_MANDATORY, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_NON_BREAKING_GLUE, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_QUOTATION, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page33[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page34[256] = { - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page35[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page36[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page37[256] = { - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page38[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page39[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page46[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page47[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page48[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page49[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page50[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page51[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page52[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page77[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page78[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page159[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page164[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page172[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page215[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page216[256] = { - G_UNICODE_BREAK_SURROGATE, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page219[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_SURROGATE, - G_UNICODE_BREAK_SURROGATE, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_SURROGATE -}; - -static char page220[256] = { - G_UNICODE_BREAK_SURROGATE, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page223[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_SURROGATE -}; - -static char page224[256] = { - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC -}; - -static char page248[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_AMBIGUOUS -}; - -static char page250[256] = { - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN -}; - -static char page251[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC -}; - -static char page253[256] = { - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char page254[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_EXCLAMATION, - G_UNICODE_BREAK_EXCLAMATION, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NON_BREAKING_GLUE -}; - -static char page255[256] = { - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_EXCLAMATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_EXCLAMATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_CONTINGENT, - G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_UNKNOWN, - G_UNICODE_BREAK_UNKNOWN -}; - -static char *break_property_table[256] = { - page0, - page1, - page2, - page3, - page4, - page5, - page6, - page7, - (char *) G_UNICODE_BREAK_UNKNOWN, - page9, - page10, - page11, - page12, - page13, - page14, - page15, - page16, - page17, - page18, - page19, - page20, - (char *) G_UNICODE_BREAK_ALPHABETIC, - page22, - page23, - page24, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - page30, - page31, - page32, - page33, - page34, - page35, - page36, - page37, - page38, - page39, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - page46, - page47, - page48, - page49, - page50, - page51, - page52, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - page77, - page78, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - page159, - (char *) G_UNICODE_BREAK_IDEOGRAPHIC, - (char *) G_UNICODE_BREAK_IDEOGRAPHIC, - (char *) G_UNICODE_BREAK_IDEOGRAPHIC, - (char *) G_UNICODE_BREAK_IDEOGRAPHIC, - page164, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - (char *) G_UNICODE_BREAK_UNKNOWN, - page172, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - page215, - page216, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - page219, - page220, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - page223, - page224, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - (char *) G_UNICODE_BREAK_ALPHABETIC, - page248, - (char *) G_UNICODE_BREAK_IDEOGRAPHIC, - page250, - page251, - (char *) G_UNICODE_BREAK_ALPHABETIC, - page253, - page254, - page255 -}; - -#endif /* BREAKTABLES_H */ diff --git a/gunichartables.h b/gunichartables.h deleted file mode 100644 index bcbbb18c8..000000000 --- a/gunichartables.h +++ /dev/null @@ -1,5957 +0,0 @@ -/* This file is automatically generated. DO NOT EDIT! - Instead, edit gen-unicode-tables.pl and re-run. */ - -#ifndef CHARTABLES_H -#define CHARTABLES_H - -#define G_UNICODE_DATA_VERSION "3.0.1" - -#define G_UNICODE_LAST_CHAR 0xffff - -static char page0[256] = { - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_CONNECT_PUNCTUATION, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_MATH_SYMBOL, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_MATH_SYMBOL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, G_UNICODE_CONTROL, - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_INITIAL_PUNCTUATION, G_UNICODE_MATH_SYMBOL, - G_UNICODE_DASH_PUNCTUATION, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_OTHER_NUMBER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_FINAL_PUNCTUATION, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_MATH_SYMBOL, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_MATH_SYMBOL, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER -}; - -static char page1[256] = { - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER -}; - -static char page2[256] = { - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page3[256] = { - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page4[256] = { - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_ENCLOSING_MARK, - G_UNICODE_ENCLOSING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page5[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page6[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_ENCLOSING_MARK, G_UNICODE_ENCLOSING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED -}; - -static char page7[256] = { - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_UNASSIGNED, G_UNICODE_FORMAT, G_UNICODE_OTHER_LETTER, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page9[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_LETTER, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page10[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_LETTER, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page11[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_LETTER, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page12[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page13[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page14[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page15[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page16[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page17[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page18[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER -}; - -static char page19[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page20[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER -}; - -static char page22[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_SPACE_SEPARATOR, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page23[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_COMBINING_MARK, - G_UNICODE_COMBINING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page24[256] = { - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_DASH_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_FORMAT, G_UNICODE_FORMAT, - G_UNICODE_FORMAT, G_UNICODE_FORMAT, G_UNICODE_UNASSIGNED, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page30[256] = { - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page31[256] = { - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_TITLECASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_TITLECASE_LETTER, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_UNASSIGNED -}; - -static char page32[256] = { - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_SPACE_SEPARATOR, - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_SPACE_SEPARATOR, - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_SPACE_SEPARATOR, - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_SPACE_SEPARATOR, - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_SPACE_SEPARATOR, - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_SPACE_SEPARATOR, G_UNICODE_FORMAT, - G_UNICODE_FORMAT, G_UNICODE_FORMAT, G_UNICODE_FORMAT, - G_UNICODE_DASH_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_DASH_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_DASH_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_INITIAL_PUNCTUATION, G_UNICODE_FINAL_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_INITIAL_PUNCTUATION, - G_UNICODE_INITIAL_PUNCTUATION, G_UNICODE_FINAL_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_INITIAL_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_LINE_SEPARATOR, G_UNICODE_PARAGRAPH_SEPARATOR, G_UNICODE_FORMAT, - G_UNICODE_FORMAT, G_UNICODE_FORMAT, G_UNICODE_FORMAT, G_UNICODE_FORMAT, - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_INITIAL_PUNCTUATION, G_UNICODE_FINAL_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_CONNECT_PUNCTUATION, G_UNICODE_CONNECT_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_FORMAT, - G_UNICODE_FORMAT, G_UNICODE_FORMAT, G_UNICODE_FORMAT, G_UNICODE_FORMAT, - G_UNICODE_FORMAT, G_UNICODE_OTHER_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_ENCLOSING_MARK, G_UNICODE_ENCLOSING_MARK, - G_UNICODE_ENCLOSING_MARK, G_UNICODE_ENCLOSING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_ENCLOSING_MARK, - G_UNICODE_ENCLOSING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page33[256] = { - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UPPERCASE_LETTER, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page34[256] = { - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page35[256] = { - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char page36[256] = { - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_NUMBER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page37[256] = { - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page38[256] = { - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page39[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page46[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page47[256] = { - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page48[256] = { - G_UNICODE_SPACE_SEPARATOR, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_DASH_PUNCTUATION, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_LETTER_NUMBER, - G_UNICODE_LETTER_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_CONNECT_PUNCTUATION, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_UNASSIGNED -}; - -static char page49[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page50[256] = { - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_OTHER_NUMBER, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED -}; - -static char page51[256] = { - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED -}; - -static char page77[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page159[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page164[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page215[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page250[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page251[256] = { - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER -}; - -static char page253[256] = { - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED -}; - -static char page254[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_NON_SPACING_MARK, - G_UNICODE_NON_SPACING_MARK, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_DASH_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_CONNECT_PUNCTUATION, G_UNICODE_CONNECT_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_CONNECT_PUNCTUATION, - G_UNICODE_CONNECT_PUNCTUATION, G_UNICODE_CONNECT_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_DASH_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_MATH_SYMBOL, G_UNICODE_DASH_PUNCTUATION, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_FORMAT -}; - -static char page255[256] = { - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_DECIMAL_NUMBER, G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_CONNECT_PUNCTUATION, G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_LOWERCASE_LETTER, G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_MATH_SYMBOL, - G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_MATH_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_CONNECT_PUNCTUATION, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_MODIFIER_LETTER, - G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_OTHER_LETTER, - G_UNICODE_OTHER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_UNASSIGNED, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, - G_UNICODE_MATH_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, - G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED, G_UNICODE_FORMAT, - G_UNICODE_FORMAT, G_UNICODE_FORMAT, G_UNICODE_OTHER_SYMBOL, - G_UNICODE_OTHER_SYMBOL, G_UNICODE_UNASSIGNED, G_UNICODE_UNASSIGNED -}; - -static char *type_table[256] = { - page0, - page1, - page2, - page3, - page4, - page5, - page6, - page7, - (char *) G_UNICODE_UNASSIGNED, - page9, - page10, - page11, - page12, - page13, - page14, - page15, - page16, - page17, - page18, - page19, - page20, - (char *) G_UNICODE_OTHER_LETTER, - page22, - page23, - page24, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - page30, - page31, - page32, - page33, - page34, - page35, - page36, - page37, - page38, - page39, - (char *) G_UNICODE_OTHER_SYMBOL, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - page46, - page47, - page48, - page49, - page50, - page51, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - page77, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - page159, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - page164, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_UNASSIGNED, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - (char *) G_UNICODE_OTHER_LETTER, - page215, - (char *) G_UNICODE_SURROGATE, - (char *) G_UNICODE_SURROGATE, - (char *) G_UNICODE_SURROGATE, - (char *) G_UNICODE_SURROGATE, - (char *) G_UNICODE_SURROGATE, - (char *) G_UNICODE_SURROGATE, - (char *) G_UNICODE_SURROGATE, - (char *) G_UNICODE_SURROGATE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_PRIVATE_USE, - (char *) G_UNICODE_OTHER_LETTER, - page250, - page251, - (char *) G_UNICODE_OTHER_LETTER, - page253, - page254, - page255 -}; - -static unsigned short attrpage0[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, - 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, - 0x007a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0041, 0x0042, - 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b, - 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, - 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x039c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, - 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, - 0x00ef, 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0000, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0000, 0x00c0, - 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, - 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x00d0, 0x00d1, 0x00d2, - 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0000, 0x00d8, 0x00d9, 0x00da, 0x00db, - 0x00dc, 0x00dd, 0x00de, 0x0178 -}; - -static unsigned short attrpage1[256] = { - 0x0101, 0x0100, 0x0103, 0x0102, 0x0105, 0x0104, 0x0107, 0x0106, 0x0109, - 0x0108, 0x010b, 0x010a, 0x010d, 0x010c, 0x010f, 0x010e, 0x0111, 0x0110, - 0x0113, 0x0112, 0x0115, 0x0114, 0x0117, 0x0116, 0x0119, 0x0118, 0x011b, - 0x011a, 0x011d, 0x011c, 0x011f, 0x011e, 0x0121, 0x0120, 0x0123, 0x0122, - 0x0125, 0x0124, 0x0127, 0x0126, 0x0129, 0x0128, 0x012b, 0x012a, 0x012d, - 0x012c, 0x012f, 0x012e, 0x0069, 0x0049, 0x0133, 0x0132, 0x0135, 0x0134, - 0x0137, 0x0136, 0x0000, 0x013a, 0x0139, 0x013c, 0x013b, 0x013e, 0x013d, - 0x0140, 0x013f, 0x0142, 0x0141, 0x0144, 0x0143, 0x0146, 0x0145, 0x0148, - 0x0147, 0x0000, 0x014b, 0x014a, 0x014d, 0x014c, 0x014f, 0x014e, 0x0151, - 0x0150, 0x0153, 0x0152, 0x0155, 0x0154, 0x0157, 0x0156, 0x0159, 0x0158, - 0x015b, 0x015a, 0x015d, 0x015c, 0x015f, 0x015e, 0x0161, 0x0160, 0x0163, - 0x0162, 0x0165, 0x0164, 0x0167, 0x0166, 0x0169, 0x0168, 0x016b, 0x016a, - 0x016d, 0x016c, 0x016f, 0x016e, 0x0171, 0x0170, 0x0173, 0x0172, 0x0175, - 0x0174, 0x0177, 0x0176, 0x00ff, 0x017a, 0x0179, 0x017c, 0x017b, 0x017e, - 0x017d, 0x0053, 0x0000, 0x0253, 0x0183, 0x0182, 0x0185, 0x0184, 0x0254, - 0x0188, 0x0187, 0x0256, 0x0257, 0x018c, 0x018b, 0x0000, 0x01dd, 0x0259, - 0x025b, 0x0192, 0x0191, 0x0260, 0x0263, 0x01f6, 0x0269, 0x0268, 0x0199, - 0x0198, 0x0000, 0x0000, 0x026f, 0x0272, 0x0000, 0x0275, 0x01a1, 0x01a0, - 0x01a3, 0x01a2, 0x01a5, 0x01a4, 0x0280, 0x01a8, 0x01a7, 0x0283, 0x0000, - 0x0000, 0x01ad, 0x01ac, 0x0288, 0x01b0, 0x01af, 0x028a, 0x028b, 0x01b4, - 0x01b3, 0x01b6, 0x01b5, 0x0292, 0x01b9, 0x01b8, 0x0000, 0x0000, 0x01bd, - 0x01bc, 0x0000, 0x01f7, 0x0000, 0x0000, 0x0000, 0x0000, 0x01c6, 0x0000, - 0x01c4, 0x01c9, 0x0000, 0x01c7, 0x01cc, 0x0000, 0x01ca, 0x01ce, 0x01cd, - 0x01d0, 0x01cf, 0x01d2, 0x01d1, 0x01d4, 0x01d3, 0x01d6, 0x01d5, 0x01d8, - 0x01d7, 0x01da, 0x01d9, 0x01dc, 0x01db, 0x018e, 0x01df, 0x01de, 0x01e1, - 0x01e0, 0x01e3, 0x01e2, 0x01e5, 0x01e4, 0x01e7, 0x01e6, 0x01e9, 0x01e8, - 0x01eb, 0x01ea, 0x01ed, 0x01ec, 0x01ef, 0x01ee, 0x0000, 0x01f3, 0x0000, - 0x01f1, 0x01f5, 0x01f4, 0x0195, 0x01bf, 0x01f9, 0x01f8, 0x01fb, 0x01fa, - 0x01fd, 0x01fc, 0x01ff, 0x01fe -}; - -static unsigned short attrpage2[256] = { - 0x0201, 0x0200, 0x0203, 0x0202, 0x0205, 0x0204, 0x0207, 0x0206, 0x0209, - 0x0208, 0x020b, 0x020a, 0x020d, 0x020c, 0x020f, 0x020e, 0x0211, 0x0210, - 0x0213, 0x0212, 0x0215, 0x0214, 0x0217, 0x0216, 0x0219, 0x0218, 0x021b, - 0x021a, 0x021d, 0x021c, 0x021f, 0x021e, 0x0000, 0x0000, 0x0223, 0x0222, - 0x0225, 0x0224, 0x0227, 0x0226, 0x0229, 0x0228, 0x022b, 0x022a, 0x022d, - 0x022c, 0x022f, 0x022e, 0x0231, 0x0230, 0x0233, 0x0232, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0181, 0x0186, 0x0000, 0x0189, 0x018a, 0x0000, 0x018f, - 0x0000, 0x0190, 0x0000, 0x0000, 0x0000, 0x0000, 0x0193, 0x0000, 0x0000, - 0x0194, 0x0000, 0x0000, 0x0000, 0x0000, 0x0197, 0x0196, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x019c, 0x0000, 0x0000, 0x019d, 0x0000, 0x0000, - 0x019f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x01a6, 0x0000, 0x0000, 0x01a9, 0x0000, 0x0000, 0x0000, - 0x0000, 0x01ae, 0x0000, 0x01b1, 0x01b2, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x01b7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage3[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03ac, - 0x0000, 0x03ad, 0x03ae, 0x03af, 0x0000, 0x03cc, 0x0000, 0x03cd, 0x03ce, - 0x0000, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, - 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, - 0x0000, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca, - 0x03cb, 0x0386, 0x0388, 0x0389, 0x038a, 0x0000, 0x0391, 0x0392, 0x0393, - 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, - 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a3, 0x03a4, 0x03a5, - 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x038c, 0x038e, 0x038f, - 0x0000, 0x0392, 0x0398, 0x0000, 0x0000, 0x0000, 0x03a6, 0x03a0, 0x0000, - 0x0000, 0x0000, 0x03db, 0x03da, 0x03dd, 0x03dc, 0x03df, 0x03de, 0x03e1, - 0x03e0, 0x03e3, 0x03e2, 0x03e5, 0x03e4, 0x03e7, 0x03e6, 0x03e9, 0x03e8, - 0x03eb, 0x03ea, 0x03ed, 0x03ec, 0x03ef, 0x03ee, 0x039a, 0x03a1, 0x03a3, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage4[256] = { - 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, - 0x0459, 0x045a, 0x045b, 0x045c, 0x045d, 0x045e, 0x045f, 0x0430, 0x0431, - 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, - 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, - 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, - 0x044d, 0x044e, 0x044f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, - 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, - 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0x0400, - 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, - 0x040a, 0x040b, 0x040c, 0x040d, 0x040e, 0x040f, 0x0461, 0x0460, 0x0463, - 0x0462, 0x0465, 0x0464, 0x0467, 0x0466, 0x0469, 0x0468, 0x046b, 0x046a, - 0x046d, 0x046c, 0x046f, 0x046e, 0x0471, 0x0470, 0x0473, 0x0472, 0x0475, - 0x0474, 0x0477, 0x0476, 0x0479, 0x0478, 0x047b, 0x047a, 0x047d, 0x047c, - 0x047f, 0x047e, 0x0481, 0x0480, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x048d, 0x048c, 0x048f, 0x048e, - 0x0491, 0x0490, 0x0493, 0x0492, 0x0495, 0x0494, 0x0497, 0x0496, 0x0499, - 0x0498, 0x049b, 0x049a, 0x049d, 0x049c, 0x049f, 0x049e, 0x04a1, 0x04a0, - 0x04a3, 0x04a2, 0x04a5, 0x04a4, 0x04a7, 0x04a6, 0x04a9, 0x04a8, 0x04ab, - 0x04aa, 0x04ad, 0x04ac, 0x04af, 0x04ae, 0x04b1, 0x04b0, 0x04b3, 0x04b2, - 0x04b5, 0x04b4, 0x04b7, 0x04b6, 0x04b9, 0x04b8, 0x04bb, 0x04ba, 0x04bd, - 0x04bc, 0x04bf, 0x04be, 0x0000, 0x04c2, 0x04c1, 0x04c4, 0x04c3, 0x0000, - 0x0000, 0x04c8, 0x04c7, 0x0000, 0x0000, 0x04cc, 0x04cb, 0x0000, 0x0000, - 0x0000, 0x04d1, 0x04d0, 0x04d3, 0x04d2, 0x04d5, 0x04d4, 0x04d7, 0x04d6, - 0x04d9, 0x04d8, 0x04db, 0x04da, 0x04dd, 0x04dc, 0x04df, 0x04de, 0x04e1, - 0x04e0, 0x04e3, 0x04e2, 0x04e5, 0x04e4, 0x04e7, 0x04e6, 0x04e9, 0x04e8, - 0x04eb, 0x04ea, 0x04ed, 0x04ec, 0x04ef, 0x04ee, 0x04f1, 0x04f0, 0x04f3, - 0x04f2, 0x04f5, 0x04f4, 0x0000, 0x0000, 0x04f9, 0x04f8, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage5[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, - 0x0566, 0x0567, 0x0568, 0x0569, 0x056a, 0x056b, 0x056c, 0x056d, 0x056e, - 0x056f, 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577, - 0x0578, 0x0579, 0x057a, 0x057b, 0x057c, 0x057d, 0x057e, 0x057f, 0x0580, - 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0531, 0x0532, - 0x0533, 0x0534, 0x0535, 0x0536, 0x0537, 0x0538, 0x0539, 0x053a, 0x053b, - 0x053c, 0x053d, 0x053e, 0x053f, 0x0540, 0x0541, 0x0542, 0x0543, 0x0544, - 0x0545, 0x0546, 0x0547, 0x0548, 0x0549, 0x054a, 0x054b, 0x054c, 0x054d, - 0x054e, 0x054f, 0x0550, 0x0551, 0x0552, 0x0553, 0x0554, 0x0555, 0x0556, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage6[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, - 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, - 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage9[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, - 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage10[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, - 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage11[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, - 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage12[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, - 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage13[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, - 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage14[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage15[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, - 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage16[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage19[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0003, - 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage23[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage24[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, - 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage30[256] = { - 0x1e01, 0x1e00, 0x1e03, 0x1e02, 0x1e05, 0x1e04, 0x1e07, 0x1e06, 0x1e09, - 0x1e08, 0x1e0b, 0x1e0a, 0x1e0d, 0x1e0c, 0x1e0f, 0x1e0e, 0x1e11, 0x1e10, - 0x1e13, 0x1e12, 0x1e15, 0x1e14, 0x1e17, 0x1e16, 0x1e19, 0x1e18, 0x1e1b, - 0x1e1a, 0x1e1d, 0x1e1c, 0x1e1f, 0x1e1e, 0x1e21, 0x1e20, 0x1e23, 0x1e22, - 0x1e25, 0x1e24, 0x1e27, 0x1e26, 0x1e29, 0x1e28, 0x1e2b, 0x1e2a, 0x1e2d, - 0x1e2c, 0x1e2f, 0x1e2e, 0x1e31, 0x1e30, 0x1e33, 0x1e32, 0x1e35, 0x1e34, - 0x1e37, 0x1e36, 0x1e39, 0x1e38, 0x1e3b, 0x1e3a, 0x1e3d, 0x1e3c, 0x1e3f, - 0x1e3e, 0x1e41, 0x1e40, 0x1e43, 0x1e42, 0x1e45, 0x1e44, 0x1e47, 0x1e46, - 0x1e49, 0x1e48, 0x1e4b, 0x1e4a, 0x1e4d, 0x1e4c, 0x1e4f, 0x1e4e, 0x1e51, - 0x1e50, 0x1e53, 0x1e52, 0x1e55, 0x1e54, 0x1e57, 0x1e56, 0x1e59, 0x1e58, - 0x1e5b, 0x1e5a, 0x1e5d, 0x1e5c, 0x1e5f, 0x1e5e, 0x1e61, 0x1e60, 0x1e63, - 0x1e62, 0x1e65, 0x1e64, 0x1e67, 0x1e66, 0x1e69, 0x1e68, 0x1e6b, 0x1e6a, - 0x1e6d, 0x1e6c, 0x1e6f, 0x1e6e, 0x1e71, 0x1e70, 0x1e73, 0x1e72, 0x1e75, - 0x1e74, 0x1e77, 0x1e76, 0x1e79, 0x1e78, 0x1e7b, 0x1e7a, 0x1e7d, 0x1e7c, - 0x1e7f, 0x1e7e, 0x1e81, 0x1e80, 0x1e83, 0x1e82, 0x1e85, 0x1e84, 0x1e87, - 0x1e86, 0x1e89, 0x1e88, 0x1e8b, 0x1e8a, 0x1e8d, 0x1e8c, 0x1e8f, 0x1e8e, - 0x1e91, 0x1e90, 0x1e93, 0x1e92, 0x1e95, 0x1e94, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1e60, 0x0000, 0x0000, 0x0000, 0x0000, 0x1ea1, 0x1ea0, - 0x1ea3, 0x1ea2, 0x1ea5, 0x1ea4, 0x1ea7, 0x1ea6, 0x1ea9, 0x1ea8, 0x1eab, - 0x1eaa, 0x1ead, 0x1eac, 0x1eaf, 0x1eae, 0x1eb1, 0x1eb0, 0x1eb3, 0x1eb2, - 0x1eb5, 0x1eb4, 0x1eb7, 0x1eb6, 0x1eb9, 0x1eb8, 0x1ebb, 0x1eba, 0x1ebd, - 0x1ebc, 0x1ebf, 0x1ebe, 0x1ec1, 0x1ec0, 0x1ec3, 0x1ec2, 0x1ec5, 0x1ec4, - 0x1ec7, 0x1ec6, 0x1ec9, 0x1ec8, 0x1ecb, 0x1eca, 0x1ecd, 0x1ecc, 0x1ecf, - 0x1ece, 0x1ed1, 0x1ed0, 0x1ed3, 0x1ed2, 0x1ed5, 0x1ed4, 0x1ed7, 0x1ed6, - 0x1ed9, 0x1ed8, 0x1edb, 0x1eda, 0x1edd, 0x1edc, 0x1edf, 0x1ede, 0x1ee1, - 0x1ee0, 0x1ee3, 0x1ee2, 0x1ee5, 0x1ee4, 0x1ee7, 0x1ee6, 0x1ee9, 0x1ee8, - 0x1eeb, 0x1eea, 0x1eed, 0x1eec, 0x1eef, 0x1eee, 0x1ef1, 0x1ef0, 0x1ef3, - 0x1ef2, 0x1ef5, 0x1ef4, 0x1ef7, 0x1ef6, 0x1ef9, 0x1ef8, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage31[256] = { - 0x1f08, 0x1f09, 0x1f0a, 0x1f0b, 0x1f0c, 0x1f0d, 0x1f0e, 0x1f0f, 0x1f00, - 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07, 0x1f18, 0x1f19, - 0x1f1a, 0x1f1b, 0x1f1c, 0x1f1d, 0x0000, 0x0000, 0x1f10, 0x1f11, 0x1f12, - 0x1f13, 0x1f14, 0x1f15, 0x0000, 0x0000, 0x1f28, 0x1f29, 0x1f2a, 0x1f2b, - 0x1f2c, 0x1f2d, 0x1f2e, 0x1f2f, 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, - 0x1f25, 0x1f26, 0x1f27, 0x1f38, 0x1f39, 0x1f3a, 0x1f3b, 0x1f3c, 0x1f3d, - 0x1f3e, 0x1f3f, 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, - 0x1f37, 0x1f48, 0x1f49, 0x1f4a, 0x1f4b, 0x1f4c, 0x1f4d, 0x0000, 0x0000, - 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0x0000, 0x0000, 0x0000, - 0x1f59, 0x0000, 0x1f5b, 0x0000, 0x1f5d, 0x0000, 0x1f5f, 0x0000, 0x1f51, - 0x0000, 0x1f53, 0x0000, 0x1f55, 0x0000, 0x1f57, 0x1f68, 0x1f69, 0x1f6a, - 0x1f6b, 0x1f6c, 0x1f6d, 0x1f6e, 0x1f6f, 0x1f60, 0x1f61, 0x1f62, 0x1f63, - 0x1f64, 0x1f65, 0x1f66, 0x1f67, 0x1fba, 0x1fbb, 0x1fc8, 0x1fc9, 0x1fca, - 0x1fcb, 0x1fda, 0x1fdb, 0x1ff8, 0x1ff9, 0x1fea, 0x1feb, 0x1ffa, 0x1ffb, - 0x0000, 0x0000, 0x1f88, 0x1f89, 0x1f8a, 0x1f8b, 0x1f8c, 0x1f8d, 0x1f8e, - 0x1f8f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1f98, 0x1f99, 0x1f9a, 0x1f9b, 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1fa8, 0x1fa9, - 0x1faa, 0x1fab, 0x1fac, 0x1fad, 0x1fae, 0x1faf, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1fb8, 0x1fb9, 0x0000, 0x1fbc, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1fb0, 0x1fb1, 0x1f70, 0x1f71, 0x0000, - 0x0000, 0x0399, 0x0000, 0x0000, 0x0000, 0x0000, 0x1fcc, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1fd8, 0x1fd9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1fd0, 0x1fd1, 0x1f76, 0x1f77, 0x0000, 0x0000, 0x0000, 0x0000, 0x1fe8, - 0x1fe9, 0x0000, 0x0000, 0x0000, 0x1fec, 0x0000, 0x0000, 0x1fe0, 0x1fe1, - 0x1f7a, 0x1f7b, 0x1fe5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1ffc, 0x0000, 0x0000, 0x0000, 0x0000, 0x1f78, 0x1f79, 0x1f7c, 0x1f7d, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage33[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x03c9, 0x0000, 0x0000, 0x0000, 0x006b, 0x00e5, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short attrpage255[256] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, - 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xff41, 0xff42, 0xff43, - 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, - 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, - 0xff56, 0xff57, 0xff58, 0xff59, 0xff5a, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, - 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, - 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, - 0xff3a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 -}; - -static unsigned short *attr_table[256] = { - attrpage0, - attrpage1, - attrpage2, - attrpage3, - attrpage4, - attrpage5, - attrpage6, - 0x0000, - 0x0000, - attrpage9, - attrpage10, - attrpage11, - attrpage12, - attrpage13, - attrpage14, - attrpage15, - attrpage16, - 0x0000, - 0x0000, - attrpage19, - 0x0000, - 0x0000, - 0x0000, - attrpage23, - attrpage24, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - attrpage30, - attrpage31, - 0x0000, - attrpage33, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - attrpage255 -}; - -static unsigned short title_table[][3] = { - { 0x01c5, 0x01c4, 0x01c6 }, - { 0x01c8, 0x01c7, 0x01c9 }, - { 0x01cb, 0x01ca, 0x01cc }, - { 0x01f2, 0x01f1, 0x01f3 }, - { 0x1f88, 0x0000, 0x1f80 }, - { 0x1f89, 0x0000, 0x1f81 }, - { 0x1f8a, 0x0000, 0x1f82 }, - { 0x1f8b, 0x0000, 0x1f83 }, - { 0x1f8c, 0x0000, 0x1f84 }, - { 0x1f8d, 0x0000, 0x1f85 }, - { 0x1f8e, 0x0000, 0x1f86 }, - { 0x1f8f, 0x0000, 0x1f87 }, - { 0x1f98, 0x0000, 0x1f90 }, - { 0x1f99, 0x0000, 0x1f91 }, - { 0x1f9a, 0x0000, 0x1f92 }, - { 0x1f9b, 0x0000, 0x1f93 }, - { 0x1f9c, 0x0000, 0x1f94 }, - { 0x1f9d, 0x0000, 0x1f95 }, - { 0x1f9e, 0x0000, 0x1f96 }, - { 0x1f9f, 0x0000, 0x1f97 }, - { 0x1fa8, 0x0000, 0x1fa0 }, - { 0x1fa9, 0x0000, 0x1fa1 }, - { 0x1faa, 0x0000, 0x1fa2 }, - { 0x1fab, 0x0000, 0x1fa3 }, - { 0x1fac, 0x0000, 0x1fa4 }, - { 0x1fad, 0x0000, 0x1fa5 }, - { 0x1fae, 0x0000, 0x1fa6 }, - { 0x1faf, 0x0000, 0x1fa7 }, - { 0x1fbc, 0x0000, 0x1fb3 }, - { 0x1fcc, 0x0000, 0x1fc3 }, - { 0x1ffc, 0x0000, 0x1ff3 } -}; - -#endif /* CHARTABLES_H */ diff --git a/gunicode.h b/gunicode.h deleted file mode 100644 index 2136005ae..000000000 --- a/gunicode.h +++ /dev/null @@ -1,252 +0,0 @@ -/* gunicode.h - Unicode manipulation functions - * - * Copyright (C) 1999, 2000 Tom Tromey - * Copyright 2000 Red Hat, Inc. - * - * The Gnome Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Gnome Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __G_UNICODE_H__ -#define __G_UNICODE_H__ - -#include <gerror.h> -#include <gtypes.h> - -G_BEGIN_DECLS - -typedef guint32 gunichar; -typedef guint16 gunichar2; - -/* These are the possible character classifications. - * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html - */ -typedef enum -{ - G_UNICODE_CONTROL, - G_UNICODE_FORMAT, - G_UNICODE_UNASSIGNED, - G_UNICODE_PRIVATE_USE, - G_UNICODE_SURROGATE, - G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_MODIFIER_LETTER, - G_UNICODE_OTHER_LETTER, - G_UNICODE_TITLECASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_COMBINING_MARK, - G_UNICODE_ENCLOSING_MARK, - G_UNICODE_NON_SPACING_MARK, - G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_LETTER_NUMBER, - G_UNICODE_OTHER_NUMBER, - G_UNICODE_CONNECT_PUNCTUATION, - G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_FINAL_PUNCTUATION, - G_UNICODE_INITIAL_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_SYMBOL, - G_UNICODE_LINE_SEPARATOR, - G_UNICODE_PARAGRAPH_SEPARATOR, - G_UNICODE_SPACE_SEPARATOR -} GUnicodeType; - -/* These are the possible line break classifications. - * See http://www.unicode.org/unicode/reports/tr14/ - */ -typedef enum -{ - G_UNICODE_BREAK_MANDATORY, - G_UNICODE_BREAK_CARRIAGE_RETURN, - G_UNICODE_BREAK_LINE_FEED, - G_UNICODE_BREAK_COMBINING_MARK, - G_UNICODE_BREAK_SURROGATE, - G_UNICODE_BREAK_ZERO_WIDTH_SPACE, - G_UNICODE_BREAK_INSEPARABLE, - G_UNICODE_BREAK_NON_BREAKING_GLUE, - G_UNICODE_BREAK_CONTINGENT, - G_UNICODE_BREAK_SPACE, - G_UNICODE_BREAK_AFTER, - G_UNICODE_BREAK_BEFORE, - G_UNICODE_BREAK_BEFORE_AND_AFTER, - G_UNICODE_BREAK_HYPHEN, - G_UNICODE_BREAK_NON_STARTER, - G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_CLOSE_PUNCTUATION, - G_UNICODE_BREAK_QUOTATION, - G_UNICODE_BREAK_EXCLAMATION, - G_UNICODE_BREAK_IDEOGRAPHIC, - G_UNICODE_BREAK_NUMERIC, - G_UNICODE_BREAK_INFIX_SEPARATOR, - G_UNICODE_BREAK_SYMBOL, - G_UNICODE_BREAK_ALPHABETIC, - G_UNICODE_BREAK_PREFIX, - G_UNICODE_BREAK_POSTFIX, - G_UNICODE_BREAK_COMPLEX_CONTEXT, - G_UNICODE_BREAK_AMBIGUOUS, - G_UNICODE_BREAK_UNKNOWN -} GUnicodeBreakType; - -/* Returns TRUE if current locale uses UTF-8 charset. If CHARSET is - * not null, sets *CHARSET to the name of the current locale's - * charset. This value is statically allocated, and should be copied - * in case the locale's charset will be changed later using setlocale() - * or in some other way. - */ -gboolean g_get_charset (G_CONST_RETURN char **charset); - -/* These are all analogs of the <ctype.h> functions. - */ -gboolean g_unichar_isalnum (gunichar c) G_GNUC_CONST; -gboolean g_unichar_isalpha (gunichar c) G_GNUC_CONST; -gboolean g_unichar_iscntrl (gunichar c) G_GNUC_CONST; -gboolean g_unichar_isdigit (gunichar c) G_GNUC_CONST; -gboolean g_unichar_isgraph (gunichar c) G_GNUC_CONST; -gboolean g_unichar_islower (gunichar c) G_GNUC_CONST; -gboolean g_unichar_isprint (gunichar c) G_GNUC_CONST; -gboolean g_unichar_ispunct (gunichar c) G_GNUC_CONST; -gboolean g_unichar_isspace (gunichar c) G_GNUC_CONST; -gboolean g_unichar_isupper (gunichar c) G_GNUC_CONST; -gboolean g_unichar_isxdigit (gunichar c) G_GNUC_CONST; -gboolean g_unichar_istitle (gunichar c) G_GNUC_CONST; -gboolean g_unichar_isdefined (gunichar c) G_GNUC_CONST; -gboolean g_unichar_iswide (gunichar c) G_GNUC_CONST; - -/* More <ctype.h> functions. These convert between the three cases. - * See the Unicode book to understand title case. */ -gunichar g_unichar_toupper (gunichar c) G_GNUC_CONST; -gunichar g_unichar_tolower (gunichar c) G_GNUC_CONST; -gunichar g_unichar_totitle (gunichar c) G_GNUC_CONST; - -/* If C is a digit (according to `g_unichar_isdigit'), then return its - numeric value. Otherwise return -1. */ -gint g_unichar_digit_value (gunichar c) G_GNUC_CONST; - -gint g_unichar_xdigit_value (gunichar c) G_GNUC_CONST; - -/* Return the Unicode character type of a given character. */ -GUnicodeType g_unichar_type (gunichar c) G_GNUC_CONST; - -/* Return the line break property for a given character */ -GUnicodeBreakType g_unichar_break_type (gunichar c) G_GNUC_CONST; - - -/* Compute canonical ordering of a string in-place. This rearranges - decomposed characters in the string according to their combining - classes. See the Unicode manual for more information. */ -void g_unicode_canonical_ordering (gunichar *string, - gsize len); - -/* Compute canonical decomposition of a character. Returns g_malloc()d - string of Unicode characters. RESULT_LEN is set to the resulting - length of the string. */ -gunichar *g_unicode_canonical_decomposition (gunichar ch, - 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]; - -#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(guchar *)(p)]) - -gunichar g_utf8_get_char (const gchar *p); -gchar* g_utf8_offset_to_pointer (const gchar *str, - glong offset); -glong g_utf8_pointer_to_offset (const gchar *str, - const gchar *pos); -gchar* g_utf8_prev_char (const gchar *p); -gchar* g_utf8_find_next_char (const gchar *p, - const gchar *end); -gchar* g_utf8_find_prev_char (const gchar *str, - const gchar *p); - -glong g_utf8_strlen (const gchar *p, - gssize max); - -/* Copies n characters from src to dest */ -gchar* g_utf8_strncpy (gchar *dest, - const gchar *src, - gsize n); - -/* Find the UTF-8 character corresponding to ch, in string p. These - functions are equivalants to strchr and strrchr */ -gchar* g_utf8_strchr (const gchar *p, - gssize len, - gunichar c); -gchar* g_utf8_strrchr (const gchar *p, - gssize len, - gunichar c); - -gunichar2 *g_utf8_to_utf16 (const gchar *str, - glong len, - glong *items_read, - glong *items_written, - GError **error); -gunichar * g_utf8_to_ucs4 (const gchar *str, - glong len, - glong *items_read, - glong *items_written, - GError **error); -gunichar * g_utf8_to_ucs4_fast (const gchar *str, - glong len, - glong *items_written); -gunichar * g_utf16_to_ucs4 (const gunichar2 *str, - glong len, - glong *items_read, - glong *items_written, - GError **error); -gchar* g_utf16_to_utf8 (const gunichar2 *str, - glong len, - glong *items_read, - glong *items_written, - GError **error); -gunichar2 *g_ucs4_to_utf16 (const gunichar *str, - glong len, - glong *items_read, - glong *items_written, - GError **error); -gchar* g_ucs4_to_utf8 (const gunichar *str, - glong len, - glong *items_read, - glong *items_written, - GError **error); - -/* Convert a single character into UTF-8. outbuf must have at - * least 6 bytes of space. Returns the number of bytes in the - * result. - */ -gint g_unichar_to_utf8 (gunichar c, - gchar *outbuf); - -/* Validate a UTF8 string, return TRUE if valid, put pointer to - * first invalid char in **end - */ - -gboolean g_utf8_validate (const gchar *str, - gssize max_len, - const gchar **end); - -/* Validate a Unicode character */ -gboolean g_unichar_validate (gunichar ch); - -G_END_DECLS - -#endif /* __G_UNICODE_H__ */ diff --git a/gunidecomp.c b/gunidecomp.c deleted file mode 100644 index 194c283c4..000000000 --- a/gunidecomp.c +++ /dev/null @@ -1,133 +0,0 @@ -/* decomp.c - Character decomposition. - * - * Copyright (C) 1999, 2000 Tom Tromey - * Copyright 2000 Red Hat, Inc. - * - * The Gnome Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Gnome Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "glib.h" -#include "gunidecomp.h" - -#include <config.h> - -#include <stdlib.h> - -/* We cheat a bit and cast type values to (char *). We detect these - using the &0xff trick. */ -#define CC(Page, Char) \ - ((((GPOINTER_TO_INT(combining_class_table[Page])) & 0xff) \ - == GPOINTER_TO_INT(combining_class_table[Page])) \ - ? GPOINTER_TO_INT(combining_class_table[Page]) \ - : (combining_class_table[Page][Char])) - -#define COMBINING_CLASS(Char) \ - (((Char) > (G_UNICODE_LAST_CHAR)) ? 0 : CC((Char) >> 8, (Char) & 0xff)) - -/* Compute the canonical ordering of a string in-place. */ -void -g_unicode_canonical_ordering (gunichar *string, - size_t len) -{ - size_t i; - int swap = 1; - - while (swap) - { - int last; - swap = 0; - last = COMBINING_CLASS (string[0]); - for (i = 0; i < len - 1; ++i) - { - int next = COMBINING_CLASS (string[i + 1]); - if (next != 0 && last > next) - { - size_t j; - /* Percolate item leftward through string. */ - for (j = i; j > 0; --j) - { - gunichar t; - if (COMBINING_CLASS (string[j]) <= next) - break; - t = string[j + 1]; - string[j + 1] = string[j]; - string[j] = t; - swap = 1; - } - /* We're re-entering the loop looking at the old - character again. */ - next = last; - } - last = next; - } - } -} - -gunichar * -g_unicode_canonical_decomposition (gunichar ch, - size_t *result_len) -{ - gunichar *r = NULL; - - if (ch <= 0xffff) - { - int start = 0; - int end = G_N_ELEMENTS (decomp_table); - while (start != end) - { - int half = (start + end) / 2; - if (ch == decomp_table[half].ch) - { - /* Found it. */ - int i, len; - /* We store as a double-nul terminated string. */ - for (len = 0; (decomp_table[half].expansion[len] - || decomp_table[half].expansion[len + 1]); - len += 2) - ; - - /* We've counted twice as many bytes as there are - characters. */ - *result_len = len / 2; - r = malloc (len / 2 * sizeof (gunichar)); - - for (i = 0; i < len; i += 2) - { - r[i / 2] = (decomp_table[half].expansion[i] << 8 - | decomp_table[half].expansion[i + 1]); - } - break; - } - else if (ch > decomp_table[half].ch) - start = half; - else - end = half; - } - } - - if (r == NULL) - { - /* Not in our table. */ - r = malloc (sizeof (gunichar)); - *r = ch; - *result_len = 1; - } - - /* Supposedly following the Unicode 2.1.9 table means that the - decompositions come out in canonical order. I haven't tested - this, but we rely on it here. */ - return r; -} diff --git a/gunidecomp.h b/gunidecomp.h deleted file mode 100644 index b49775979..000000000 --- a/gunidecomp.h +++ /dev/null @@ -1,1857 +0,0 @@ -/* This file is automatically generated. DO NOT EDIT! */ - -#ifndef DECOMP_H -#define DECOMP_H - -#define G_UNICODE_LAST_CHAR 0xffff - -static unsigned char cclass3[256] = { - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 232, 220, 220, 220, 220, 232, 216, 220, 220, - 220, 220, 220, 202, 202, 220, 220, 220, 220, 202, 202, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 1, 1, 1, 1, 1, 220, 220, 220, 220, 230, - 230, 230, 230, 230, 230, 230, 230, 240, 230, 220, 220, 220, 230, 230, 230, - 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 234, 233, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass4[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass5[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 230, 230, - 230, 230, 220, 230, 230, 230, 222, 220, 230, 230, 230, 230, 230, 230, 0, - 220, 220, 220, 220, 220, 230, 230, 220, 230, 230, 222, 228, 230, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 0, 20, 21, 22, 0, 23, 0, 24, 25, 0, 230, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass6[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 27, 28, 29, 30, 31, 32, 33, 34, 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, - 230, 230, 230, 230, 0, 0, 230, 230, 230, 230, 220, 230, 0, 0, 230, 230, 0, - 220, 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass7[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, - 220, 230, 230, 220, 230, 230, 220, 220, 220, 230, 220, 220, 230, 220, 230, - 230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass9[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 230, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass10[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass11[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass12[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 84, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass13[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass14[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 103, 103, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, - 107, 107, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 122, 122, 122, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass15[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 220, 0, 220, 0, 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, 0, 132, 0, 0, - 0, 0, 0, 130, 130, 130, 130, 0, 0, 130, 0, 230, 230, 9, 0, 230, 230, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass16[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass23[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass24[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass32[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 1, 1, 230, 230, 230, 230, 1, 1, 1, 230, - 230, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass48[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 228, 232, 222, 224, - 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass251[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 -}; - -static unsigned char cclass254[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static unsigned char *combining_class_table[256] = { - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - cclass3, - cclass4, - cclass5, - cclass6, - cclass7, - (unsigned char *) 0, - cclass9, - cclass10, - cclass11, - cclass12, - cclass13, - cclass14, - cclass15, - cclass16, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - cclass23, - cclass24, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - cclass32, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - cclass48, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - (unsigned char *) 0, - cclass251, - (unsigned char *) 0, - (unsigned char *) 0, - cclass254, - (unsigned char *) 0 -}; - -typedef struct -{ - unsigned short ch; - unsigned char *expansion; -} decomposition; - -static decomposition decomp_table[] = -{ - { 0x00c0, "\x00\x41\x03\x00\0" }, - { 0x00c1, "\x00\x41\x03\x01\0" }, - { 0x00c2, "\x00\x41\x03\x02\0" }, - { 0x00c3, "\x00\x41\x03\x03\0" }, - { 0x00c4, "\x00\x41\x03\x08\0" }, - { 0x00c5, "\x00\x41\x03\x0a\0" }, - { 0x00c7, "\x00\x43\x03\x27\0" }, - { 0x00c8, "\x00\x45\x03\x00\0" }, - { 0x00c9, "\x00\x45\x03\x01\0" }, - { 0x00ca, "\x00\x45\x03\x02\0" }, - { 0x00cb, "\x00\x45\x03\x08\0" }, - { 0x00cc, "\x00\x49\x03\x00\0" }, - { 0x00cd, "\x00\x49\x03\x01\0" }, - { 0x00ce, "\x00\x49\x03\x02\0" }, - { 0x00cf, "\x00\x49\x03\x08\0" }, - { 0x00d1, "\x00\x4e\x03\x03\0" }, - { 0x00d2, "\x00\x4f\x03\x00\0" }, - { 0x00d3, "\x00\x4f\x03\x01\0" }, - { 0x00d4, "\x00\x4f\x03\x02\0" }, - { 0x00d5, "\x00\x4f\x03\x03\0" }, - { 0x00d6, "\x00\x4f\x03\x08\0" }, - { 0x00d9, "\x00\x55\x03\x00\0" }, - { 0x00da, "\x00\x55\x03\x01\0" }, - { 0x00db, "\x00\x55\x03\x02\0" }, - { 0x00dc, "\x00\x55\x03\x08\0" }, - { 0x00dd, "\x00\x59\x03\x01\0" }, - { 0x00e0, "\x00\x61\x03\x00\0" }, - { 0x00e1, "\x00\x61\x03\x01\0" }, - { 0x00e2, "\x00\x61\x03\x02\0" }, - { 0x00e3, "\x00\x61\x03\x03\0" }, - { 0x00e4, "\x00\x61\x03\x08\0" }, - { 0x00e5, "\x00\x61\x03\x0a\0" }, - { 0x00e7, "\x00\x63\x03\x27\0" }, - { 0x00e8, "\x00\x65\x03\x00\0" }, - { 0x00e9, "\x00\x65\x03\x01\0" }, - { 0x00ea, "\x00\x65\x03\x02\0" }, - { 0x00eb, "\x00\x65\x03\x08\0" }, - { 0x00ec, "\x00\x69\x03\x00\0" }, - { 0x00ed, "\x00\x69\x03\x01\0" }, - { 0x00ee, "\x00\x69\x03\x02\0" }, - { 0x00ef, "\x00\x69\x03\x08\0" }, - { 0x00f1, "\x00\x6e\x03\x03\0" }, - { 0x00f2, "\x00\x6f\x03\x00\0" }, - { 0x00f3, "\x00\x6f\x03\x01\0" }, - { 0x00f4, "\x00\x6f\x03\x02\0" }, - { 0x00f5, "\x00\x6f\x03\x03\0" }, - { 0x00f6, "\x00\x6f\x03\x08\0" }, - { 0x00f9, "\x00\x75\x03\x00\0" }, - { 0x00fa, "\x00\x75\x03\x01\0" }, - { 0x00fb, "\x00\x75\x03\x02\0" }, - { 0x00fc, "\x00\x75\x03\x08\0" }, - { 0x00fd, "\x00\x79\x03\x01\0" }, - { 0x00ff, "\x00\x79\x03\x08\0" }, - { 0x0100, "\x00\x41\x03\x04\0" }, - { 0x0101, "\x00\x61\x03\x04\0" }, - { 0x0102, "\x00\x41\x03\x06\0" }, - { 0x0103, "\x00\x61\x03\x06\0" }, - { 0x0104, "\x00\x41\x03\x28\0" }, - { 0x0105, "\x00\x61\x03\x28\0" }, - { 0x0106, "\x00\x43\x03\x01\0" }, - { 0x0107, "\x00\x63\x03\x01\0" }, - { 0x0108, "\x00\x43\x03\x02\0" }, - { 0x0109, "\x00\x63\x03\x02\0" }, - { 0x010a, "\x00\x43\x03\x07\0" }, - { 0x010b, "\x00\x63\x03\x07\0" }, - { 0x010c, "\x00\x43\x03\x0c\0" }, - { 0x010d, "\x00\x63\x03\x0c\0" }, - { 0x010e, "\x00\x44\x03\x0c\0" }, - { 0x010f, "\x00\x64\x03\x0c\0" }, - { 0x0112, "\x00\x45\x03\x04\0" }, - { 0x0113, "\x00\x65\x03\x04\0" }, - { 0x0114, "\x00\x45\x03\x06\0" }, - { 0x0115, "\x00\x65\x03\x06\0" }, - { 0x0116, "\x00\x45\x03\x07\0" }, - { 0x0117, "\x00\x65\x03\x07\0" }, - { 0x0118, "\x00\x45\x03\x28\0" }, - { 0x0119, "\x00\x65\x03\x28\0" }, - { 0x011a, "\x00\x45\x03\x0c\0" }, - { 0x011b, "\x00\x65\x03\x0c\0" }, - { 0x011c, "\x00\x47\x03\x02\0" }, - { 0x011d, "\x00\x67\x03\x02\0" }, - { 0x011e, "\x00\x47\x03\x06\0" }, - { 0x011f, "\x00\x67\x03\x06\0" }, - { 0x0120, "\x00\x47\x03\x07\0" }, - { 0x0121, "\x00\x67\x03\x07\0" }, - { 0x0122, "\x00\x47\x03\x27\0" }, - { 0x0123, "\x00\x67\x03\x27\0" }, - { 0x0124, "\x00\x48\x03\x02\0" }, - { 0x0125, "\x00\x68\x03\x02\0" }, - { 0x0128, "\x00\x49\x03\x03\0" }, - { 0x0129, "\x00\x69\x03\x03\0" }, - { 0x012a, "\x00\x49\x03\x04\0" }, - { 0x012b, "\x00\x69\x03\x04\0" }, - { 0x012c, "\x00\x49\x03\x06\0" }, - { 0x012d, "\x00\x69\x03\x06\0" }, - { 0x012e, "\x00\x49\x03\x28\0" }, - { 0x012f, "\x00\x69\x03\x28\0" }, - { 0x0130, "\x00\x49\x03\x07\0" }, - { 0x0134, "\x00\x4a\x03\x02\0" }, - { 0x0135, "\x00\x6a\x03\x02\0" }, - { 0x0136, "\x00\x4b\x03\x27\0" }, - { 0x0137, "\x00\x6b\x03\x27\0" }, - { 0x0139, "\x00\x4c\x03\x01\0" }, - { 0x013a, "\x00\x6c\x03\x01\0" }, - { 0x013b, "\x00\x4c\x03\x27\0" }, - { 0x013c, "\x00\x6c\x03\x27\0" }, - { 0x013d, "\x00\x4c\x03\x0c\0" }, - { 0x013e, "\x00\x6c\x03\x0c\0" }, - { 0x0143, "\x00\x4e\x03\x01\0" }, - { 0x0144, "\x00\x6e\x03\x01\0" }, - { 0x0145, "\x00\x4e\x03\x27\0" }, - { 0x0146, "\x00\x6e\x03\x27\0" }, - { 0x0147, "\x00\x4e\x03\x0c\0" }, - { 0x0148, "\x00\x6e\x03\x0c\0" }, - { 0x014c, "\x00\x4f\x03\x04\0" }, - { 0x014d, "\x00\x6f\x03\x04\0" }, - { 0x014e, "\x00\x4f\x03\x06\0" }, - { 0x014f, "\x00\x6f\x03\x06\0" }, - { 0x0150, "\x00\x4f\x03\x0b\0" }, - { 0x0151, "\x00\x6f\x03\x0b\0" }, - { 0x0154, "\x00\x52\x03\x01\0" }, - { 0x0155, "\x00\x72\x03\x01\0" }, - { 0x0156, "\x00\x52\x03\x27\0" }, - { 0x0157, "\x00\x72\x03\x27\0" }, - { 0x0158, "\x00\x52\x03\x0c\0" }, - { 0x0159, "\x00\x72\x03\x0c\0" }, - { 0x015a, "\x00\x53\x03\x01\0" }, - { 0x015b, "\x00\x73\x03\x01\0" }, - { 0x015c, "\x00\x53\x03\x02\0" }, - { 0x015d, "\x00\x73\x03\x02\0" }, - { 0x015e, "\x00\x53\x03\x27\0" }, - { 0x015f, "\x00\x73\x03\x27\0" }, - { 0x0160, "\x00\x53\x03\x0c\0" }, - { 0x0161, "\x00\x73\x03\x0c\0" }, - { 0x0162, "\x00\x54\x03\x27\0" }, - { 0x0163, "\x00\x74\x03\x27\0" }, - { 0x0164, "\x00\x54\x03\x0c\0" }, - { 0x0165, "\x00\x74\x03\x0c\0" }, - { 0x0168, "\x00\x55\x03\x03\0" }, - { 0x0169, "\x00\x75\x03\x03\0" }, - { 0x016a, "\x00\x55\x03\x04\0" }, - { 0x016b, "\x00\x75\x03\x04\0" }, - { 0x016c, "\x00\x55\x03\x06\0" }, - { 0x016d, "\x00\x75\x03\x06\0" }, - { 0x016e, "\x00\x55\x03\x0a\0" }, - { 0x016f, "\x00\x75\x03\x0a\0" }, - { 0x0170, "\x00\x55\x03\x0b\0" }, - { 0x0171, "\x00\x75\x03\x0b\0" }, - { 0x0172, "\x00\x55\x03\x28\0" }, - { 0x0173, "\x00\x75\x03\x28\0" }, - { 0x0174, "\x00\x57\x03\x02\0" }, - { 0x0175, "\x00\x77\x03\x02\0" }, - { 0x0176, "\x00\x59\x03\x02\0" }, - { 0x0177, "\x00\x79\x03\x02\0" }, - { 0x0178, "\x00\x59\x03\x08\0" }, - { 0x0179, "\x00\x5a\x03\x01\0" }, - { 0x017a, "\x00\x7a\x03\x01\0" }, - { 0x017b, "\x00\x5a\x03\x07\0" }, - { 0x017c, "\x00\x7a\x03\x07\0" }, - { 0x017d, "\x00\x5a\x03\x0c\0" }, - { 0x017e, "\x00\x7a\x03\x0c\0" }, - { 0x01a0, "\x00\x4f\x03\x1b\0" }, - { 0x01a1, "\x00\x6f\x03\x1b\0" }, - { 0x01af, "\x00\x55\x03\x1b\0" }, - { 0x01b0, "\x00\x75\x03\x1b\0" }, - { 0x01cd, "\x00\x41\x03\x0c\0" }, - { 0x01ce, "\x00\x61\x03\x0c\0" }, - { 0x01cf, "\x00\x49\x03\x0c\0" }, - { 0x01d0, "\x00\x69\x03\x0c\0" }, - { 0x01d1, "\x00\x4f\x03\x0c\0" }, - { 0x01d2, "\x00\x6f\x03\x0c\0" }, - { 0x01d3, "\x00\x55\x03\x0c\0" }, - { 0x01d4, "\x00\x75\x03\x0c\0" }, - { 0x01d5, "\x00\x55\x03\x08\x03\x04\0" }, - { 0x01d6, "\x00\x75\x03\x08\x03\x04\0" }, - { 0x01d7, "\x00\x55\x03\x08\x03\x01\0" }, - { 0x01d8, "\x00\x75\x03\x08\x03\x01\0" }, - { 0x01d9, "\x00\x55\x03\x08\x03\x0c\0" }, - { 0x01da, "\x00\x75\x03\x08\x03\x0c\0" }, - { 0x01db, "\x00\x55\x03\x08\x03\x00\0" }, - { 0x01dc, "\x00\x75\x03\x08\x03\x00\0" }, - { 0x01de, "\x00\x41\x03\x08\x03\x04\0" }, - { 0x01df, "\x00\x61\x03\x08\x03\x04\0" }, - { 0x01e0, "\x00\x41\x03\x07\x03\x04\0" }, - { 0x01e1, "\x00\x61\x03\x07\x03\x04\0" }, - { 0x01e2, "\x00\xc6\x03\x04\0" }, - { 0x01e3, "\x00\xe6\x03\x04\0" }, - { 0x01e6, "\x00\x47\x03\x0c\0" }, - { 0x01e7, "\x00\x67\x03\x0c\0" }, - { 0x01e8, "\x00\x4b\x03\x0c\0" }, - { 0x01e9, "\x00\x6b\x03\x0c\0" }, - { 0x01ea, "\x00\x4f\x03\x28\0" }, - { 0x01eb, "\x00\x6f\x03\x28\0" }, - { 0x01ec, "\x00\x4f\x03\x28\x03\x04\0" }, - { 0x01ed, "\x00\x6f\x03\x28\x03\x04\0" }, - { 0x01ee, "\x01\xb7\x03\x0c\0" }, - { 0x01ef, "\x02\x92\x03\x0c\0" }, - { 0x01f0, "\x00\x6a\x03\x0c\0" }, - { 0x01f4, "\x00\x47\x03\x01\0" }, - { 0x01f5, "\x00\x67\x03\x01\0" }, - { 0x01f8, "\x00\x4e\x03\x00\0" }, - { 0x01f9, "\x00\x6e\x03\x00\0" }, - { 0x01fa, "\x00\x41\x03\x0a\x03\x01\0" }, - { 0x01fb, "\x00\x61\x03\x0a\x03\x01\0" }, - { 0x01fc, "\x00\xc6\x03\x01\0" }, - { 0x01fd, "\x00\xe6\x03\x01\0" }, - { 0x01fe, "\x00\xd8\x03\x01\0" }, - { 0x01ff, "\x00\xf8\x03\x01\0" }, - { 0x0200, "\x00\x41\x03\x0f\0" }, - { 0x0201, "\x00\x61\x03\x0f\0" }, - { 0x0202, "\x00\x41\x03\x11\0" }, - { 0x0203, "\x00\x61\x03\x11\0" }, - { 0x0204, "\x00\x45\x03\x0f\0" }, - { 0x0205, "\x00\x65\x03\x0f\0" }, - { 0x0206, "\x00\x45\x03\x11\0" }, - { 0x0207, "\x00\x65\x03\x11\0" }, - { 0x0208, "\x00\x49\x03\x0f\0" }, - { 0x0209, "\x00\x69\x03\x0f\0" }, - { 0x020a, "\x00\x49\x03\x11\0" }, - { 0x020b, "\x00\x69\x03\x11\0" }, - { 0x020c, "\x00\x4f\x03\x0f\0" }, - { 0x020d, "\x00\x6f\x03\x0f\0" }, - { 0x020e, "\x00\x4f\x03\x11\0" }, - { 0x020f, "\x00\x6f\x03\x11\0" }, - { 0x0210, "\x00\x52\x03\x0f\0" }, - { 0x0211, "\x00\x72\x03\x0f\0" }, - { 0x0212, "\x00\x52\x03\x11\0" }, - { 0x0213, "\x00\x72\x03\x11\0" }, - { 0x0214, "\x00\x55\x03\x0f\0" }, - { 0x0215, "\x00\x75\x03\x0f\0" }, - { 0x0216, "\x00\x55\x03\x11\0" }, - { 0x0217, "\x00\x75\x03\x11\0" }, - { 0x0218, "\x00\x53\x03\x26\0" }, - { 0x0219, "\x00\x73\x03\x26\0" }, - { 0x021a, "\x00\x54\x03\x26\0" }, - { 0x021b, "\x00\x74\x03\x26\0" }, - { 0x021e, "\x00\x48\x03\x0c\0" }, - { 0x021f, "\x00\x68\x03\x0c\0" }, - { 0x0226, "\x00\x41\x03\x07\0" }, - { 0x0227, "\x00\x61\x03\x07\0" }, - { 0x0228, "\x00\x45\x03\x27\0" }, - { 0x0229, "\x00\x65\x03\x27\0" }, - { 0x022a, "\x00\x4f\x03\x08\x03\x04\0" }, - { 0x022b, "\x00\x6f\x03\x08\x03\x04\0" }, - { 0x022c, "\x00\x4f\x03\x03\x03\x04\0" }, - { 0x022d, "\x00\x6f\x03\x03\x03\x04\0" }, - { 0x022e, "\x00\x4f\x03\x07\0" }, - { 0x022f, "\x00\x6f\x03\x07\0" }, - { 0x0230, "\x00\x4f\x03\x07\x03\x04\0" }, - { 0x0231, "\x00\x6f\x03\x07\x03\x04\0" }, - { 0x0232, "\x00\x59\x03\x04\0" }, - { 0x0233, "\x00\x79\x03\x04\0" }, - { 0x0340, "\x03\x00\0" }, - { 0x0341, "\x03\x01\0" }, - { 0x0343, "\x03\x13\0" }, - { 0x0344, "\x03\x08\x03\x01\0" }, - { 0x0374, "\x02\xb9\0" }, - { 0x037e, "\x00\x3b\0" }, - { 0x0385, "\x00\xa8\x03\x01\0" }, - { 0x0386, "\x03\x91\x03\x01\0" }, - { 0x0387, "\x00\xb7\0" }, - { 0x0388, "\x03\x95\x03\x01\0" }, - { 0x0389, "\x03\x97\x03\x01\0" }, - { 0x038a, "\x03\x99\x03\x01\0" }, - { 0x038c, "\x03\x9f\x03\x01\0" }, - { 0x038e, "\x03\xa5\x03\x01\0" }, - { 0x038f, "\x03\xa9\x03\x01\0" }, - { 0x0390, "\x03\xb9\x03\x08\x03\x01\0" }, - { 0x03aa, "\x03\x99\x03\x08\0" }, - { 0x03ab, "\x03\xa5\x03\x08\0" }, - { 0x03ac, "\x03\xb1\x03\x01\0" }, - { 0x03ad, "\x03\xb5\x03\x01\0" }, - { 0x03ae, "\x03\xb7\x03\x01\0" }, - { 0x03af, "\x03\xb9\x03\x01\0" }, - { 0x03b0, "\x03\xc5\x03\x08\x03\x01\0" }, - { 0x03ca, "\x03\xb9\x03\x08\0" }, - { 0x03cb, "\x03\xc5\x03\x08\0" }, - { 0x03cc, "\x03\xbf\x03\x01\0" }, - { 0x03cd, "\x03\xc5\x03\x01\0" }, - { 0x03ce, "\x03\xc9\x03\x01\0" }, - { 0x03d3, "\x03\xd2\x03\x01\0" }, - { 0x03d4, "\x03\xd2\x03\x08\0" }, - { 0x0400, "\x04\x15\x03\x00\0" }, - { 0x0401, "\x04\x15\x03\x08\0" }, - { 0x0403, "\x04\x13\x03\x01\0" }, - { 0x0407, "\x04\x06\x03\x08\0" }, - { 0x040c, "\x04\x1a\x03\x01\0" }, - { 0x040d, "\x04\x18\x03\x00\0" }, - { 0x040e, "\x04\x23\x03\x06\0" }, - { 0x0419, "\x04\x18\x03\x06\0" }, - { 0x0439, "\x04\x38\x03\x06\0" }, - { 0x0450, "\x04\x35\x03\x00\0" }, - { 0x0451, "\x04\x35\x03\x08\0" }, - { 0x0453, "\x04\x33\x03\x01\0" }, - { 0x0457, "\x04\x56\x03\x08\0" }, - { 0x045c, "\x04\x3a\x03\x01\0" }, - { 0x045d, "\x04\x38\x03\x00\0" }, - { 0x045e, "\x04\x43\x03\x06\0" }, - { 0x0476, "\x04\x74\x03\x0f\0" }, - { 0x0477, "\x04\x75\x03\x0f\0" }, - { 0x04c1, "\x04\x16\x03\x06\0" }, - { 0x04c2, "\x04\x36\x03\x06\0" }, - { 0x04d0, "\x04\x10\x03\x06\0" }, - { 0x04d1, "\x04\x30\x03\x06\0" }, - { 0x04d2, "\x04\x10\x03\x08\0" }, - { 0x04d3, "\x04\x30\x03\x08\0" }, - { 0x04d6, "\x04\x15\x03\x06\0" }, - { 0x04d7, "\x04\x35\x03\x06\0" }, - { 0x04da, "\x04\xd8\x03\x08\0" }, - { 0x04db, "\x04\xd9\x03\x08\0" }, - { 0x04dc, "\x04\x16\x03\x08\0" }, - { 0x04dd, "\x04\x36\x03\x08\0" }, - { 0x04de, "\x04\x17\x03\x08\0" }, - { 0x04df, "\x04\x37\x03\x08\0" }, - { 0x04e2, "\x04\x18\x03\x04\0" }, - { 0x04e3, "\x04\x38\x03\x04\0" }, - { 0x04e4, "\x04\x18\x03\x08\0" }, - { 0x04e5, "\x04\x38\x03\x08\0" }, - { 0x04e6, "\x04\x1e\x03\x08\0" }, - { 0x04e7, "\x04\x3e\x03\x08\0" }, - { 0x04ea, "\x04\xe8\x03\x08\0" }, - { 0x04eb, "\x04\xe9\x03\x08\0" }, - { 0x04ec, "\x04\x2d\x03\x08\0" }, - { 0x04ed, "\x04\x4d\x03\x08\0" }, - { 0x04ee, "\x04\x23\x03\x04\0" }, - { 0x04ef, "\x04\x43\x03\x04\0" }, - { 0x04f0, "\x04\x23\x03\x08\0" }, - { 0x04f1, "\x04\x43\x03\x08\0" }, - { 0x04f2, "\x04\x23\x03\x0b\0" }, - { 0x04f3, "\x04\x43\x03\x0b\0" }, - { 0x04f4, "\x04\x27\x03\x08\0" }, - { 0x04f5, "\x04\x47\x03\x08\0" }, - { 0x04f8, "\x04\x2b\x03\x08\0" }, - { 0x04f9, "\x04\x4b\x03\x08\0" }, - { 0x0622, "\x06\x27\x06\x53\0" }, - { 0x0623, "\x06\x27\x06\x54\0" }, - { 0x0624, "\x06\x48\x06\x54\0" }, - { 0x0625, "\x06\x27\x06\x55\0" }, - { 0x0626, "\x06\x4a\x06\x54\0" }, - { 0x06c0, "\x06\xd5\x06\x54\0" }, - { 0x06c2, "\x06\xc1\x06\x54\0" }, - { 0x06d3, "\x06\xd2\x06\x54\0" }, - { 0x0929, "\x09\x28\x09\x3c\0" }, - { 0x0931, "\x09\x30\x09\x3c\0" }, - { 0x0934, "\x09\x33\x09\x3c\0" }, - { 0x0958, "\x09\x15\x09\x3c\0" }, - { 0x0959, "\x09\x16\x09\x3c\0" }, - { 0x095a, "\x09\x17\x09\x3c\0" }, - { 0x095b, "\x09\x1c\x09\x3c\0" }, - { 0x095c, "\x09\x21\x09\x3c\0" }, - { 0x095d, "\x09\x22\x09\x3c\0" }, - { 0x095e, "\x09\x2b\x09\x3c\0" }, - { 0x095f, "\x09\x2f\x09\x3c\0" }, - { 0x09cb, "\x09\xc7\x09\xbe\0" }, - { 0x09cc, "\x09\xc7\x09\xd7\0" }, - { 0x09dc, "\x09\xa1\x09\xbc\0" }, - { 0x09dd, "\x09\xa2\x09\xbc\0" }, - { 0x09df, "\x09\xaf\x09\xbc\0" }, - { 0x0a33, "\x0a\x32\x0a\x3c\0" }, - { 0x0a36, "\x0a\x38\x0a\x3c\0" }, - { 0x0a59, "\x0a\x16\x0a\x3c\0" }, - { 0x0a5a, "\x0a\x17\x0a\x3c\0" }, - { 0x0a5b, "\x0a\x1c\x0a\x3c\0" }, - { 0x0a5e, "\x0a\x2b\x0a\x3c\0" }, - { 0x0b48, "\x0b\x47\x0b\x56\0" }, - { 0x0b4b, "\x0b\x47\x0b\x3e\0" }, - { 0x0b4c, "\x0b\x47\x0b\x57\0" }, - { 0x0b5c, "\x0b\x21\x0b\x3c\0" }, - { 0x0b5d, "\x0b\x22\x0b\x3c\0" }, - { 0x0b94, "\x0b\x92\x0b\xd7\0" }, - { 0x0bca, "\x0b\xc6\x0b\xbe\0" }, - { 0x0bcb, "\x0b\xc7\x0b\xbe\0" }, - { 0x0bcc, "\x0b\xc6\x0b\xd7\0" }, - { 0x0c48, "\x0c\x46\x0c\x56\0" }, - { 0x0cc0, "\x0c\xbf\x0c\xd5\0" }, - { 0x0cc7, "\x0c\xc6\x0c\xd5\0" }, - { 0x0cc8, "\x0c\xc6\x0c\xd6\0" }, - { 0x0cca, "\x0c\xc6\x0c\xc2\0" }, - { 0x0ccb, "\x0c\xc6\x0c\xc2\x0c\xd5\0" }, - { 0x0d4a, "\x0d\x46\x0d\x3e\0" }, - { 0x0d4b, "\x0d\x47\x0d\x3e\0" }, - { 0x0d4c, "\x0d\x46\x0d\x57\0" }, - { 0x0dda, "\x0d\xd9\x0d\xca\0" }, - { 0x0ddc, "\x0d\xd9\x0d\xcf\0" }, - { 0x0ddd, "\x0d\xd9\x0d\xcf\x0d\xca\0" }, - { 0x0dde, "\x0d\xd9\x0d\xdf\0" }, - { 0x0f43, "\x0f\x42\x0f\xb7\0" }, - { 0x0f4d, "\x0f\x4c\x0f\xb7\0" }, - { 0x0f52, "\x0f\x51\x0f\xb7\0" }, - { 0x0f57, "\x0f\x56\x0f\xb7\0" }, - { 0x0f5c, "\x0f\x5b\x0f\xb7\0" }, - { 0x0f69, "\x0f\x40\x0f\xb5\0" }, - { 0x0f73, "\x0f\x71\x0f\x72\0" }, - { 0x0f75, "\x0f\x71\x0f\x74\0" }, - { 0x0f76, "\x0f\xb2\x0f\x80\0" }, - { 0x0f78, "\x0f\xb3\x0f\x80\0" }, - { 0x0f81, "\x0f\x71\x0f\x80\0" }, - { 0x0f93, "\x0f\x92\x0f\xb7\0" }, - { 0x0f9d, "\x0f\x9c\x0f\xb7\0" }, - { 0x0fa2, "\x0f\xa1\x0f\xb7\0" }, - { 0x0fa7, "\x0f\xa6\x0f\xb7\0" }, - { 0x0fac, "\x0f\xab\x0f\xb7\0" }, - { 0x0fb9, "\x0f\x90\x0f\xb5\0" }, - { 0x1026, "\x10\x25\x10\x2e\0" }, - { 0x1e00, "\x00\x41\x03\x25\0" }, - { 0x1e01, "\x00\x61\x03\x25\0" }, - { 0x1e02, "\x00\x42\x03\x07\0" }, - { 0x1e03, "\x00\x62\x03\x07\0" }, - { 0x1e04, "\x00\x42\x03\x23\0" }, - { 0x1e05, "\x00\x62\x03\x23\0" }, - { 0x1e06, "\x00\x42\x03\x31\0" }, - { 0x1e07, "\x00\x62\x03\x31\0" }, - { 0x1e08, "\x00\x43\x03\x27\x03\x01\0" }, - { 0x1e09, "\x00\x63\x03\x27\x03\x01\0" }, - { 0x1e0a, "\x00\x44\x03\x07\0" }, - { 0x1e0b, "\x00\x64\x03\x07\0" }, - { 0x1e0c, "\x00\x44\x03\x23\0" }, - { 0x1e0d, "\x00\x64\x03\x23\0" }, - { 0x1e0e, "\x00\x44\x03\x31\0" }, - { 0x1e0f, "\x00\x64\x03\x31\0" }, - { 0x1e10, "\x00\x44\x03\x27\0" }, - { 0x1e11, "\x00\x64\x03\x27\0" }, - { 0x1e12, "\x00\x44\x03\x2d\0" }, - { 0x1e13, "\x00\x64\x03\x2d\0" }, - { 0x1e14, "\x00\x45\x03\x04\x03\x00\0" }, - { 0x1e15, "\x00\x65\x03\x04\x03\x00\0" }, - { 0x1e16, "\x00\x45\x03\x04\x03\x01\0" }, - { 0x1e17, "\x00\x65\x03\x04\x03\x01\0" }, - { 0x1e18, "\x00\x45\x03\x2d\0" }, - { 0x1e19, "\x00\x65\x03\x2d\0" }, - { 0x1e1a, "\x00\x45\x03\x30\0" }, - { 0x1e1b, "\x00\x65\x03\x30\0" }, - { 0x1e1c, "\x00\x45\x03\x27\x03\x06\0" }, - { 0x1e1d, "\x00\x65\x03\x27\x03\x06\0" }, - { 0x1e1e, "\x00\x46\x03\x07\0" }, - { 0x1e1f, "\x00\x66\x03\x07\0" }, - { 0x1e20, "\x00\x47\x03\x04\0" }, - { 0x1e21, "\x00\x67\x03\x04\0" }, - { 0x1e22, "\x00\x48\x03\x07\0" }, - { 0x1e23, "\x00\x68\x03\x07\0" }, - { 0x1e24, "\x00\x48\x03\x23\0" }, - { 0x1e25, "\x00\x68\x03\x23\0" }, - { 0x1e26, "\x00\x48\x03\x08\0" }, - { 0x1e27, "\x00\x68\x03\x08\0" }, - { 0x1e28, "\x00\x48\x03\x27\0" }, - { 0x1e29, "\x00\x68\x03\x27\0" }, - { 0x1e2a, "\x00\x48\x03\x2e\0" }, - { 0x1e2b, "\x00\x68\x03\x2e\0" }, - { 0x1e2c, "\x00\x49\x03\x30\0" }, - { 0x1e2d, "\x00\x69\x03\x30\0" }, - { 0x1e2e, "\x00\x49\x03\x08\x03\x01\0" }, - { 0x1e2f, "\x00\x69\x03\x08\x03\x01\0" }, - { 0x1e30, "\x00\x4b\x03\x01\0" }, - { 0x1e31, "\x00\x6b\x03\x01\0" }, - { 0x1e32, "\x00\x4b\x03\x23\0" }, - { 0x1e33, "\x00\x6b\x03\x23\0" }, - { 0x1e34, "\x00\x4b\x03\x31\0" }, - { 0x1e35, "\x00\x6b\x03\x31\0" }, - { 0x1e36, "\x00\x4c\x03\x23\0" }, - { 0x1e37, "\x00\x6c\x03\x23\0" }, - { 0x1e38, "\x00\x4c\x03\x23\x03\x04\0" }, - { 0x1e39, "\x00\x6c\x03\x23\x03\x04\0" }, - { 0x1e3a, "\x00\x4c\x03\x31\0" }, - { 0x1e3b, "\x00\x6c\x03\x31\0" }, - { 0x1e3c, "\x00\x4c\x03\x2d\0" }, - { 0x1e3d, "\x00\x6c\x03\x2d\0" }, - { 0x1e3e, "\x00\x4d\x03\x01\0" }, - { 0x1e3f, "\x00\x6d\x03\x01\0" }, - { 0x1e40, "\x00\x4d\x03\x07\0" }, - { 0x1e41, "\x00\x6d\x03\x07\0" }, - { 0x1e42, "\x00\x4d\x03\x23\0" }, - { 0x1e43, "\x00\x6d\x03\x23\0" }, - { 0x1e44, "\x00\x4e\x03\x07\0" }, - { 0x1e45, "\x00\x6e\x03\x07\0" }, - { 0x1e46, "\x00\x4e\x03\x23\0" }, - { 0x1e47, "\x00\x6e\x03\x23\0" }, - { 0x1e48, "\x00\x4e\x03\x31\0" }, - { 0x1e49, "\x00\x6e\x03\x31\0" }, - { 0x1e4a, "\x00\x4e\x03\x2d\0" }, - { 0x1e4b, "\x00\x6e\x03\x2d\0" }, - { 0x1e4c, "\x00\x4f\x03\x03\x03\x01\0" }, - { 0x1e4d, "\x00\x6f\x03\x03\x03\x01\0" }, - { 0x1e4e, "\x00\x4f\x03\x03\x03\x08\0" }, - { 0x1e4f, "\x00\x6f\x03\x03\x03\x08\0" }, - { 0x1e50, "\x00\x4f\x03\x04\x03\x00\0" }, - { 0x1e51, "\x00\x6f\x03\x04\x03\x00\0" }, - { 0x1e52, "\x00\x4f\x03\x04\x03\x01\0" }, - { 0x1e53, "\x00\x6f\x03\x04\x03\x01\0" }, - { 0x1e54, "\x00\x50\x03\x01\0" }, - { 0x1e55, "\x00\x70\x03\x01\0" }, - { 0x1e56, "\x00\x50\x03\x07\0" }, - { 0x1e57, "\x00\x70\x03\x07\0" }, - { 0x1e58, "\x00\x52\x03\x07\0" }, - { 0x1e59, "\x00\x72\x03\x07\0" }, - { 0x1e5a, "\x00\x52\x03\x23\0" }, - { 0x1e5b, "\x00\x72\x03\x23\0" }, - { 0x1e5c, "\x00\x52\x03\x23\x03\x04\0" }, - { 0x1e5d, "\x00\x72\x03\x23\x03\x04\0" }, - { 0x1e5e, "\x00\x52\x03\x31\0" }, - { 0x1e5f, "\x00\x72\x03\x31\0" }, - { 0x1e60, "\x00\x53\x03\x07\0" }, - { 0x1e61, "\x00\x73\x03\x07\0" }, - { 0x1e62, "\x00\x53\x03\x23\0" }, - { 0x1e63, "\x00\x73\x03\x23\0" }, - { 0x1e64, "\x00\x53\x03\x01\x03\x07\0" }, - { 0x1e65, "\x00\x73\x03\x01\x03\x07\0" }, - { 0x1e66, "\x00\x53\x03\x0c\x03\x07\0" }, - { 0x1e67, "\x00\x73\x03\x0c\x03\x07\0" }, - { 0x1e68, "\x00\x53\x03\x23\x03\x07\0" }, - { 0x1e69, "\x00\x73\x03\x23\x03\x07\0" }, - { 0x1e6a, "\x00\x54\x03\x07\0" }, - { 0x1e6b, "\x00\x74\x03\x07\0" }, - { 0x1e6c, "\x00\x54\x03\x23\0" }, - { 0x1e6d, "\x00\x74\x03\x23\0" }, - { 0x1e6e, "\x00\x54\x03\x31\0" }, - { 0x1e6f, "\x00\x74\x03\x31\0" }, - { 0x1e70, "\x00\x54\x03\x2d\0" }, - { 0x1e71, "\x00\x74\x03\x2d\0" }, - { 0x1e72, "\x00\x55\x03\x24\0" }, - { 0x1e73, "\x00\x75\x03\x24\0" }, - { 0x1e74, "\x00\x55\x03\x30\0" }, - { 0x1e75, "\x00\x75\x03\x30\0" }, - { 0x1e76, "\x00\x55\x03\x2d\0" }, - { 0x1e77, "\x00\x75\x03\x2d\0" }, - { 0x1e78, "\x00\x55\x03\x03\x03\x01\0" }, - { 0x1e79, "\x00\x75\x03\x03\x03\x01\0" }, - { 0x1e7a, "\x00\x55\x03\x04\x03\x08\0" }, - { 0x1e7b, "\x00\x75\x03\x04\x03\x08\0" }, - { 0x1e7c, "\x00\x56\x03\x03\0" }, - { 0x1e7d, "\x00\x76\x03\x03\0" }, - { 0x1e7e, "\x00\x56\x03\x23\0" }, - { 0x1e7f, "\x00\x76\x03\x23\0" }, - { 0x1e80, "\x00\x57\x03\x00\0" }, - { 0x1e81, "\x00\x77\x03\x00\0" }, - { 0x1e82, "\x00\x57\x03\x01\0" }, - { 0x1e83, "\x00\x77\x03\x01\0" }, - { 0x1e84, "\x00\x57\x03\x08\0" }, - { 0x1e85, "\x00\x77\x03\x08\0" }, - { 0x1e86, "\x00\x57\x03\x07\0" }, - { 0x1e87, "\x00\x77\x03\x07\0" }, - { 0x1e88, "\x00\x57\x03\x23\0" }, - { 0x1e89, "\x00\x77\x03\x23\0" }, - { 0x1e8a, "\x00\x58\x03\x07\0" }, - { 0x1e8b, "\x00\x78\x03\x07\0" }, - { 0x1e8c, "\x00\x58\x03\x08\0" }, - { 0x1e8d, "\x00\x78\x03\x08\0" }, - { 0x1e8e, "\x00\x59\x03\x07\0" }, - { 0x1e8f, "\x00\x79\x03\x07\0" }, - { 0x1e90, "\x00\x5a\x03\x02\0" }, - { 0x1e91, "\x00\x7a\x03\x02\0" }, - { 0x1e92, "\x00\x5a\x03\x23\0" }, - { 0x1e93, "\x00\x7a\x03\x23\0" }, - { 0x1e94, "\x00\x5a\x03\x31\0" }, - { 0x1e95, "\x00\x7a\x03\x31\0" }, - { 0x1e96, "\x00\x68\x03\x31\0" }, - { 0x1e97, "\x00\x74\x03\x08\0" }, - { 0x1e98, "\x00\x77\x03\x0a\0" }, - { 0x1e99, "\x00\x79\x03\x0a\0" }, - { 0x1e9b, "\x01\x7f\x03\x07\0" }, - { 0x1ea0, "\x00\x41\x03\x23\0" }, - { 0x1ea1, "\x00\x61\x03\x23\0" }, - { 0x1ea2, "\x00\x41\x03\x09\0" }, - { 0x1ea3, "\x00\x61\x03\x09\0" }, - { 0x1ea4, "\x00\x41\x03\x02\x03\x01\0" }, - { 0x1ea5, "\x00\x61\x03\x02\x03\x01\0" }, - { 0x1ea6, "\x00\x41\x03\x02\x03\x00\0" }, - { 0x1ea7, "\x00\x61\x03\x02\x03\x00\0" }, - { 0x1ea8, "\x00\x41\x03\x02\x03\x09\0" }, - { 0x1ea9, "\x00\x61\x03\x02\x03\x09\0" }, - { 0x1eaa, "\x00\x41\x03\x02\x03\x03\0" }, - { 0x1eab, "\x00\x61\x03\x02\x03\x03\0" }, - { 0x1eac, "\x00\x41\x03\x23\x03\x02\0" }, - { 0x1ead, "\x00\x61\x03\x23\x03\x02\0" }, - { 0x1eae, "\x00\x41\x03\x06\x03\x01\0" }, - { 0x1eaf, "\x00\x61\x03\x06\x03\x01\0" }, - { 0x1eb0, "\x00\x41\x03\x06\x03\x00\0" }, - { 0x1eb1, "\x00\x61\x03\x06\x03\x00\0" }, - { 0x1eb2, "\x00\x41\x03\x06\x03\x09\0" }, - { 0x1eb3, "\x00\x61\x03\x06\x03\x09\0" }, - { 0x1eb4, "\x00\x41\x03\x06\x03\x03\0" }, - { 0x1eb5, "\x00\x61\x03\x06\x03\x03\0" }, - { 0x1eb6, "\x00\x41\x03\x23\x03\x06\0" }, - { 0x1eb7, "\x00\x61\x03\x23\x03\x06\0" }, - { 0x1eb8, "\x00\x45\x03\x23\0" }, - { 0x1eb9, "\x00\x65\x03\x23\0" }, - { 0x1eba, "\x00\x45\x03\x09\0" }, - { 0x1ebb, "\x00\x65\x03\x09\0" }, - { 0x1ebc, "\x00\x45\x03\x03\0" }, - { 0x1ebd, "\x00\x65\x03\x03\0" }, - { 0x1ebe, "\x00\x45\x03\x02\x03\x01\0" }, - { 0x1ebf, "\x00\x65\x03\x02\x03\x01\0" }, - { 0x1ec0, "\x00\x45\x03\x02\x03\x00\0" }, - { 0x1ec1, "\x00\x65\x03\x02\x03\x00\0" }, - { 0x1ec2, "\x00\x45\x03\x02\x03\x09\0" }, - { 0x1ec3, "\x00\x65\x03\x02\x03\x09\0" }, - { 0x1ec4, "\x00\x45\x03\x02\x03\x03\0" }, - { 0x1ec5, "\x00\x65\x03\x02\x03\x03\0" }, - { 0x1ec6, "\x00\x45\x03\x23\x03\x02\0" }, - { 0x1ec7, "\x00\x65\x03\x23\x03\x02\0" }, - { 0x1ec8, "\x00\x49\x03\x09\0" }, - { 0x1ec9, "\x00\x69\x03\x09\0" }, - { 0x1eca, "\x00\x49\x03\x23\0" }, - { 0x1ecb, "\x00\x69\x03\x23\0" }, - { 0x1ecc, "\x00\x4f\x03\x23\0" }, - { 0x1ecd, "\x00\x6f\x03\x23\0" }, - { 0x1ece, "\x00\x4f\x03\x09\0" }, - { 0x1ecf, "\x00\x6f\x03\x09\0" }, - { 0x1ed0, "\x00\x4f\x03\x02\x03\x01\0" }, - { 0x1ed1, "\x00\x6f\x03\x02\x03\x01\0" }, - { 0x1ed2, "\x00\x4f\x03\x02\x03\x00\0" }, - { 0x1ed3, "\x00\x6f\x03\x02\x03\x00\0" }, - { 0x1ed4, "\x00\x4f\x03\x02\x03\x09\0" }, - { 0x1ed5, "\x00\x6f\x03\x02\x03\x09\0" }, - { 0x1ed6, "\x00\x4f\x03\x02\x03\x03\0" }, - { 0x1ed7, "\x00\x6f\x03\x02\x03\x03\0" }, - { 0x1ed8, "\x00\x4f\x03\x23\x03\x02\0" }, - { 0x1ed9, "\x00\x6f\x03\x23\x03\x02\0" }, - { 0x1eda, "\x00\x4f\x03\x1b\x03\x01\0" }, - { 0x1edb, "\x00\x6f\x03\x1b\x03\x01\0" }, - { 0x1edc, "\x00\x4f\x03\x1b\x03\x00\0" }, - { 0x1edd, "\x00\x6f\x03\x1b\x03\x00\0" }, - { 0x1ede, "\x00\x4f\x03\x1b\x03\x09\0" }, - { 0x1edf, "\x00\x6f\x03\x1b\x03\x09\0" }, - { 0x1ee0, "\x00\x4f\x03\x1b\x03\x03\0" }, - { 0x1ee1, "\x00\x6f\x03\x1b\x03\x03\0" }, - { 0x1ee2, "\x00\x4f\x03\x1b\x03\x23\0" }, - { 0x1ee3, "\x00\x6f\x03\x1b\x03\x23\0" }, - { 0x1ee4, "\x00\x55\x03\x23\0" }, - { 0x1ee5, "\x00\x75\x03\x23\0" }, - { 0x1ee6, "\x00\x55\x03\x09\0" }, - { 0x1ee7, "\x00\x75\x03\x09\0" }, - { 0x1ee8, "\x00\x55\x03\x1b\x03\x01\0" }, - { 0x1ee9, "\x00\x75\x03\x1b\x03\x01\0" }, - { 0x1eea, "\x00\x55\x03\x1b\x03\x00\0" }, - { 0x1eeb, "\x00\x75\x03\x1b\x03\x00\0" }, - { 0x1eec, "\x00\x55\x03\x1b\x03\x09\0" }, - { 0x1eed, "\x00\x75\x03\x1b\x03\x09\0" }, - { 0x1eee, "\x00\x55\x03\x1b\x03\x03\0" }, - { 0x1eef, "\x00\x75\x03\x1b\x03\x03\0" }, - { 0x1ef0, "\x00\x55\x03\x1b\x03\x23\0" }, - { 0x1ef1, "\x00\x75\x03\x1b\x03\x23\0" }, - { 0x1ef2, "\x00\x59\x03\x00\0" }, - { 0x1ef3, "\x00\x79\x03\x00\0" }, - { 0x1ef4, "\x00\x59\x03\x23\0" }, - { 0x1ef5, "\x00\x79\x03\x23\0" }, - { 0x1ef6, "\x00\x59\x03\x09\0" }, - { 0x1ef7, "\x00\x79\x03\x09\0" }, - { 0x1ef8, "\x00\x59\x03\x03\0" }, - { 0x1ef9, "\x00\x79\x03\x03\0" }, - { 0x1f00, "\x03\xb1\x03\x13\0" }, - { 0x1f01, "\x03\xb1\x03\x14\0" }, - { 0x1f02, "\x03\xb1\x03\x13\x03\x00\0" }, - { 0x1f03, "\x03\xb1\x03\x14\x03\x00\0" }, - { 0x1f04, "\x03\xb1\x03\x13\x03\x01\0" }, - { 0x1f05, "\x03\xb1\x03\x14\x03\x01\0" }, - { 0x1f06, "\x03\xb1\x03\x13\x03\x42\0" }, - { 0x1f07, "\x03\xb1\x03\x14\x03\x42\0" }, - { 0x1f08, "\x03\x91\x03\x13\0" }, - { 0x1f09, "\x03\x91\x03\x14\0" }, - { 0x1f0a, "\x03\x91\x03\x13\x03\x00\0" }, - { 0x1f0b, "\x03\x91\x03\x14\x03\x00\0" }, - { 0x1f0c, "\x03\x91\x03\x13\x03\x01\0" }, - { 0x1f0d, "\x03\x91\x03\x14\x03\x01\0" }, - { 0x1f0e, "\x03\x91\x03\x13\x03\x42\0" }, - { 0x1f0f, "\x03\x91\x03\x14\x03\x42\0" }, - { 0x1f10, "\x03\xb5\x03\x13\0" }, - { 0x1f11, "\x03\xb5\x03\x14\0" }, - { 0x1f12, "\x03\xb5\x03\x13\x03\x00\0" }, - { 0x1f13, "\x03\xb5\x03\x14\x03\x00\0" }, - { 0x1f14, "\x03\xb5\x03\x13\x03\x01\0" }, - { 0x1f15, "\x03\xb5\x03\x14\x03\x01\0" }, - { 0x1f18, "\x03\x95\x03\x13\0" }, - { 0x1f19, "\x03\x95\x03\x14\0" }, - { 0x1f1a, "\x03\x95\x03\x13\x03\x00\0" }, - { 0x1f1b, "\x03\x95\x03\x14\x03\x00\0" }, - { 0x1f1c, "\x03\x95\x03\x13\x03\x01\0" }, - { 0x1f1d, "\x03\x95\x03\x14\x03\x01\0" }, - { 0x1f20, "\x03\xb7\x03\x13\0" }, - { 0x1f21, "\x03\xb7\x03\x14\0" }, - { 0x1f22, "\x03\xb7\x03\x13\x03\x00\0" }, - { 0x1f23, "\x03\xb7\x03\x14\x03\x00\0" }, - { 0x1f24, "\x03\xb7\x03\x13\x03\x01\0" }, - { 0x1f25, "\x03\xb7\x03\x14\x03\x01\0" }, - { 0x1f26, "\x03\xb7\x03\x13\x03\x42\0" }, - { 0x1f27, "\x03\xb7\x03\x14\x03\x42\0" }, - { 0x1f28, "\x03\x97\x03\x13\0" }, - { 0x1f29, "\x03\x97\x03\x14\0" }, - { 0x1f2a, "\x03\x97\x03\x13\x03\x00\0" }, - { 0x1f2b, "\x03\x97\x03\x14\x03\x00\0" }, - { 0x1f2c, "\x03\x97\x03\x13\x03\x01\0" }, - { 0x1f2d, "\x03\x97\x03\x14\x03\x01\0" }, - { 0x1f2e, "\x03\x97\x03\x13\x03\x42\0" }, - { 0x1f2f, "\x03\x97\x03\x14\x03\x42\0" }, - { 0x1f30, "\x03\xb9\x03\x13\0" }, - { 0x1f31, "\x03\xb9\x03\x14\0" }, - { 0x1f32, "\x03\xb9\x03\x13\x03\x00\0" }, - { 0x1f33, "\x03\xb9\x03\x14\x03\x00\0" }, - { 0x1f34, "\x03\xb9\x03\x13\x03\x01\0" }, - { 0x1f35, "\x03\xb9\x03\x14\x03\x01\0" }, - { 0x1f36, "\x03\xb9\x03\x13\x03\x42\0" }, - { 0x1f37, "\x03\xb9\x03\x14\x03\x42\0" }, - { 0x1f38, "\x03\x99\x03\x13\0" }, - { 0x1f39, "\x03\x99\x03\x14\0" }, - { 0x1f3a, "\x03\x99\x03\x13\x03\x00\0" }, - { 0x1f3b, "\x03\x99\x03\x14\x03\x00\0" }, - { 0x1f3c, "\x03\x99\x03\x13\x03\x01\0" }, - { 0x1f3d, "\x03\x99\x03\x14\x03\x01\0" }, - { 0x1f3e, "\x03\x99\x03\x13\x03\x42\0" }, - { 0x1f3f, "\x03\x99\x03\x14\x03\x42\0" }, - { 0x1f40, "\x03\xbf\x03\x13\0" }, - { 0x1f41, "\x03\xbf\x03\x14\0" }, - { 0x1f42, "\x03\xbf\x03\x13\x03\x00\0" }, - { 0x1f43, "\x03\xbf\x03\x14\x03\x00\0" }, - { 0x1f44, "\x03\xbf\x03\x13\x03\x01\0" }, - { 0x1f45, "\x03\xbf\x03\x14\x03\x01\0" }, - { 0x1f48, "\x03\x9f\x03\x13\0" }, - { 0x1f49, "\x03\x9f\x03\x14\0" }, - { 0x1f4a, "\x03\x9f\x03\x13\x03\x00\0" }, - { 0x1f4b, "\x03\x9f\x03\x14\x03\x00\0" }, - { 0x1f4c, "\x03\x9f\x03\x13\x03\x01\0" }, - { 0x1f4d, "\x03\x9f\x03\x14\x03\x01\0" }, - { 0x1f50, "\x03\xc5\x03\x13\0" }, - { 0x1f51, "\x03\xc5\x03\x14\0" }, - { 0x1f52, "\x03\xc5\x03\x13\x03\x00\0" }, - { 0x1f53, "\x03\xc5\x03\x14\x03\x00\0" }, - { 0x1f54, "\x03\xc5\x03\x13\x03\x01\0" }, - { 0x1f55, "\x03\xc5\x03\x14\x03\x01\0" }, - { 0x1f56, "\x03\xc5\x03\x13\x03\x42\0" }, - { 0x1f57, "\x03\xc5\x03\x14\x03\x42\0" }, - { 0x1f59, "\x03\xa5\x03\x14\0" }, - { 0x1f5b, "\x03\xa5\x03\x14\x03\x00\0" }, - { 0x1f5d, "\x03\xa5\x03\x14\x03\x01\0" }, - { 0x1f5f, "\x03\xa5\x03\x14\x03\x42\0" }, - { 0x1f60, "\x03\xc9\x03\x13\0" }, - { 0x1f61, "\x03\xc9\x03\x14\0" }, - { 0x1f62, "\x03\xc9\x03\x13\x03\x00\0" }, - { 0x1f63, "\x03\xc9\x03\x14\x03\x00\0" }, - { 0x1f64, "\x03\xc9\x03\x13\x03\x01\0" }, - { 0x1f65, "\x03\xc9\x03\x14\x03\x01\0" }, - { 0x1f66, "\x03\xc9\x03\x13\x03\x42\0" }, - { 0x1f67, "\x03\xc9\x03\x14\x03\x42\0" }, - { 0x1f68, "\x03\xa9\x03\x13\0" }, - { 0x1f69, "\x03\xa9\x03\x14\0" }, - { 0x1f6a, "\x03\xa9\x03\x13\x03\x00\0" }, - { 0x1f6b, "\x03\xa9\x03\x14\x03\x00\0" }, - { 0x1f6c, "\x03\xa9\x03\x13\x03\x01\0" }, - { 0x1f6d, "\x03\xa9\x03\x14\x03\x01\0" }, - { 0x1f6e, "\x03\xa9\x03\x13\x03\x42\0" }, - { 0x1f6f, "\x03\xa9\x03\x14\x03\x42\0" }, - { 0x1f70, "\x03\xb1\x03\x00\0" }, - { 0x1f71, "\x03\xb1\x03\x01\0" }, - { 0x1f72, "\x03\xb5\x03\x00\0" }, - { 0x1f73, "\x03\xb5\x03\x01\0" }, - { 0x1f74, "\x03\xb7\x03\x00\0" }, - { 0x1f75, "\x03\xb7\x03\x01\0" }, - { 0x1f76, "\x03\xb9\x03\x00\0" }, - { 0x1f77, "\x03\xb9\x03\x01\0" }, - { 0x1f78, "\x03\xbf\x03\x00\0" }, - { 0x1f79, "\x03\xbf\x03\x01\0" }, - { 0x1f7a, "\x03\xc5\x03\x00\0" }, - { 0x1f7b, "\x03\xc5\x03\x01\0" }, - { 0x1f7c, "\x03\xc9\x03\x00\0" }, - { 0x1f7d, "\x03\xc9\x03\x01\0" }, - { 0x1f80, "\x03\xb1\x03\x13\x03\x45\0" }, - { 0x1f81, "\x03\xb1\x03\x14\x03\x45\0" }, - { 0x1f82, "\x03\xb1\x03\x13\x03\x00\x03\x45\0" }, - { 0x1f83, "\x03\xb1\x03\x14\x03\x00\x03\x45\0" }, - { 0x1f84, "\x03\xb1\x03\x13\x03\x01\x03\x45\0" }, - { 0x1f85, "\x03\xb1\x03\x14\x03\x01\x03\x45\0" }, - { 0x1f86, "\x03\xb1\x03\x13\x03\x42\x03\x45\0" }, - { 0x1f87, "\x03\xb1\x03\x14\x03\x42\x03\x45\0" }, - { 0x1f88, "\x03\x91\x03\x13\x03\x45\0" }, - { 0x1f89, "\x03\x91\x03\x14\x03\x45\0" }, - { 0x1f8a, "\x03\x91\x03\x13\x03\x00\x03\x45\0" }, - { 0x1f8b, "\x03\x91\x03\x14\x03\x00\x03\x45\0" }, - { 0x1f8c, "\x03\x91\x03\x13\x03\x01\x03\x45\0" }, - { 0x1f8d, "\x03\x91\x03\x14\x03\x01\x03\x45\0" }, - { 0x1f8e, "\x03\x91\x03\x13\x03\x42\x03\x45\0" }, - { 0x1f8f, "\x03\x91\x03\x14\x03\x42\x03\x45\0" }, - { 0x1f90, "\x03\xb7\x03\x13\x03\x45\0" }, - { 0x1f91, "\x03\xb7\x03\x14\x03\x45\0" }, - { 0x1f92, "\x03\xb7\x03\x13\x03\x00\x03\x45\0" }, - { 0x1f93, "\x03\xb7\x03\x14\x03\x00\x03\x45\0" }, - { 0x1f94, "\x03\xb7\x03\x13\x03\x01\x03\x45\0" }, - { 0x1f95, "\x03\xb7\x03\x14\x03\x01\x03\x45\0" }, - { 0x1f96, "\x03\xb7\x03\x13\x03\x42\x03\x45\0" }, - { 0x1f97, "\x03\xb7\x03\x14\x03\x42\x03\x45\0" }, - { 0x1f98, "\x03\x97\x03\x13\x03\x45\0" }, - { 0x1f99, "\x03\x97\x03\x14\x03\x45\0" }, - { 0x1f9a, "\x03\x97\x03\x13\x03\x00\x03\x45\0" }, - { 0x1f9b, "\x03\x97\x03\x14\x03\x00\x03\x45\0" }, - { 0x1f9c, "\x03\x97\x03\x13\x03\x01\x03\x45\0" }, - { 0x1f9d, "\x03\x97\x03\x14\x03\x01\x03\x45\0" }, - { 0x1f9e, "\x03\x97\x03\x13\x03\x42\x03\x45\0" }, - { 0x1f9f, "\x03\x97\x03\x14\x03\x42\x03\x45\0" }, - { 0x1fa0, "\x03\xc9\x03\x13\x03\x45\0" }, - { 0x1fa1, "\x03\xc9\x03\x14\x03\x45\0" }, - { 0x1fa2, "\x03\xc9\x03\x13\x03\x00\x03\x45\0" }, - { 0x1fa3, "\x03\xc9\x03\x14\x03\x00\x03\x45\0" }, - { 0x1fa4, "\x03\xc9\x03\x13\x03\x01\x03\x45\0" }, - { 0x1fa5, "\x03\xc9\x03\x14\x03\x01\x03\x45\0" }, - { 0x1fa6, "\x03\xc9\x03\x13\x03\x42\x03\x45\0" }, - { 0x1fa7, "\x03\xc9\x03\x14\x03\x42\x03\x45\0" }, - { 0x1fa8, "\x03\xa9\x03\x13\x03\x45\0" }, - { 0x1fa9, "\x03\xa9\x03\x14\x03\x45\0" }, - { 0x1faa, "\x03\xa9\x03\x13\x03\x00\x03\x45\0" }, - { 0x1fab, "\x03\xa9\x03\x14\x03\x00\x03\x45\0" }, - { 0x1fac, "\x03\xa9\x03\x13\x03\x01\x03\x45\0" }, - { 0x1fad, "\x03\xa9\x03\x14\x03\x01\x03\x45\0" }, - { 0x1fae, "\x03\xa9\x03\x13\x03\x42\x03\x45\0" }, - { 0x1faf, "\x03\xa9\x03\x14\x03\x42\x03\x45\0" }, - { 0x1fb0, "\x03\xb1\x03\x06\0" }, - { 0x1fb1, "\x03\xb1\x03\x04\0" }, - { 0x1fb2, "\x03\xb1\x03\x00\x03\x45\0" }, - { 0x1fb3, "\x03\xb1\x03\x45\0" }, - { 0x1fb4, "\x03\xb1\x03\x01\x03\x45\0" }, - { 0x1fb6, "\x03\xb1\x03\x42\0" }, - { 0x1fb7, "\x03\xb1\x03\x42\x03\x45\0" }, - { 0x1fb8, "\x03\x91\x03\x06\0" }, - { 0x1fb9, "\x03\x91\x03\x04\0" }, - { 0x1fba, "\x03\x91\x03\x00\0" }, - { 0x1fbb, "\x03\x91\x03\x01\0" }, - { 0x1fbc, "\x03\x91\x03\x45\0" }, - { 0x1fbe, "\x03\xb9\0" }, - { 0x1fc1, "\x00\xa8\x03\x42\0" }, - { 0x1fc2, "\x03\xb7\x03\x00\x03\x45\0" }, - { 0x1fc3, "\x03\xb7\x03\x45\0" }, - { 0x1fc4, "\x03\xb7\x03\x01\x03\x45\0" }, - { 0x1fc6, "\x03\xb7\x03\x42\0" }, - { 0x1fc7, "\x03\xb7\x03\x42\x03\x45\0" }, - { 0x1fc8, "\x03\x95\x03\x00\0" }, - { 0x1fc9, "\x03\x95\x03\x01\0" }, - { 0x1fca, "\x03\x97\x03\x00\0" }, - { 0x1fcb, "\x03\x97\x03\x01\0" }, - { 0x1fcc, "\x03\x97\x03\x45\0" }, - { 0x1fcd, "\x1f\xbf\x03\x00\0" }, - { 0x1fce, "\x1f\xbf\x03\x01\0" }, - { 0x1fcf, "\x1f\xbf\x03\x42\0" }, - { 0x1fd0, "\x03\xb9\x03\x06\0" }, - { 0x1fd1, "\x03\xb9\x03\x04\0" }, - { 0x1fd2, "\x03\xb9\x03\x08\x03\x00\0" }, - { 0x1fd3, "\x03\xb9\x03\x08\x03\x01\0" }, - { 0x1fd6, "\x03\xb9\x03\x42\0" }, - { 0x1fd7, "\x03\xb9\x03\x08\x03\x42\0" }, - { 0x1fd8, "\x03\x99\x03\x06\0" }, - { 0x1fd9, "\x03\x99\x03\x04\0" }, - { 0x1fda, "\x03\x99\x03\x00\0" }, - { 0x1fdb, "\x03\x99\x03\x01\0" }, - { 0x1fdd, "\x1f\xfe\x03\x00\0" }, - { 0x1fde, "\x1f\xfe\x03\x01\0" }, - { 0x1fdf, "\x1f\xfe\x03\x42\0" }, - { 0x1fe0, "\x03\xc5\x03\x06\0" }, - { 0x1fe1, "\x03\xc5\x03\x04\0" }, - { 0x1fe2, "\x03\xc5\x03\x08\x03\x00\0" }, - { 0x1fe3, "\x03\xc5\x03\x08\x03\x01\0" }, - { 0x1fe4, "\x03\xc1\x03\x13\0" }, - { 0x1fe5, "\x03\xc1\x03\x14\0" }, - { 0x1fe6, "\x03\xc5\x03\x42\0" }, - { 0x1fe7, "\x03\xc5\x03\x08\x03\x42\0" }, - { 0x1fe8, "\x03\xa5\x03\x06\0" }, - { 0x1fe9, "\x03\xa5\x03\x04\0" }, - { 0x1fea, "\x03\xa5\x03\x00\0" }, - { 0x1feb, "\x03\xa5\x03\x01\0" }, - { 0x1fec, "\x03\xa1\x03\x14\0" }, - { 0x1fed, "\x00\xa8\x03\x00\0" }, - { 0x1fee, "\x00\xa8\x03\x01\0" }, - { 0x1fef, "\x00\x60\0" }, - { 0x1ff2, "\x03\xc9\x03\x00\x03\x45\0" }, - { 0x1ff3, "\x03\xc9\x03\x45\0" }, - { 0x1ff4, "\x03\xc9\x03\x01\x03\x45\0" }, - { 0x1ff6, "\x03\xc9\x03\x42\0" }, - { 0x1ff7, "\x03\xc9\x03\x42\x03\x45\0" }, - { 0x1ff8, "\x03\x9f\x03\x00\0" }, - { 0x1ff9, "\x03\x9f\x03\x01\0" }, - { 0x1ffa, "\x03\xa9\x03\x00\0" }, - { 0x1ffb, "\x03\xa9\x03\x01\0" }, - { 0x1ffc, "\x03\xa9\x03\x45\0" }, - { 0x1ffd, "\x00\xb4\0" }, - { 0x2000, "\x20\x02\0" }, - { 0x2001, "\x20\x03\0" }, - { 0x2126, "\x03\xa9\0" }, - { 0x212a, "\x00\x4b\0" }, - { 0x212b, "\x00\x41\x03\x0a\0" }, - { 0x219a, "\x21\x90\x03\x38\0" }, - { 0x219b, "\x21\x92\x03\x38\0" }, - { 0x21ae, "\x21\x94\x03\x38\0" }, - { 0x21cd, "\x21\xd0\x03\x38\0" }, - { 0x21ce, "\x21\xd4\x03\x38\0" }, - { 0x21cf, "\x21\xd2\x03\x38\0" }, - { 0x2204, "\x22\x03\x03\x38\0" }, - { 0x2209, "\x22\x08\x03\x38\0" }, - { 0x220c, "\x22\x0b\x03\x38\0" }, - { 0x2224, "\x22\x23\x03\x38\0" }, - { 0x2226, "\x22\x25\x03\x38\0" }, - { 0x2241, "\x22\x3c\x03\x38\0" }, - { 0x2244, "\x22\x43\x03\x38\0" }, - { 0x2247, "\x22\x45\x03\x38\0" }, - { 0x2249, "\x22\x48\x03\x38\0" }, - { 0x2260, "\x00\x3d\x03\x38\0" }, - { 0x2262, "\x22\x61\x03\x38\0" }, - { 0x226d, "\x22\x4d\x03\x38\0" }, - { 0x226e, "\x00\x3c\x03\x38\0" }, - { 0x226f, "\x00\x3e\x03\x38\0" }, - { 0x2270, "\x22\x64\x03\x38\0" }, - { 0x2271, "\x22\x65\x03\x38\0" }, - { 0x2274, "\x22\x72\x03\x38\0" }, - { 0x2275, "\x22\x73\x03\x38\0" }, - { 0x2278, "\x22\x76\x03\x38\0" }, - { 0x2279, "\x22\x77\x03\x38\0" }, - { 0x2280, "\x22\x7a\x03\x38\0" }, - { 0x2281, "\x22\x7b\x03\x38\0" }, - { 0x2284, "\x22\x82\x03\x38\0" }, - { 0x2285, "\x22\x83\x03\x38\0" }, - { 0x2288, "\x22\x86\x03\x38\0" }, - { 0x2289, "\x22\x87\x03\x38\0" }, - { 0x22ac, "\x22\xa2\x03\x38\0" }, - { 0x22ad, "\x22\xa8\x03\x38\0" }, - { 0x22ae, "\x22\xa9\x03\x38\0" }, - { 0x22af, "\x22\xab\x03\x38\0" }, - { 0x22e0, "\x22\x7c\x03\x38\0" }, - { 0x22e1, "\x22\x7d\x03\x38\0" }, - { 0x22e2, "\x22\x91\x03\x38\0" }, - { 0x22e3, "\x22\x92\x03\x38\0" }, - { 0x22ea, "\x22\xb2\x03\x38\0" }, - { 0x22eb, "\x22\xb3\x03\x38\0" }, - { 0x22ec, "\x22\xb4\x03\x38\0" }, - { 0x22ed, "\x22\xb5\x03\x38\0" }, - { 0x2329, "\x30\x08\0" }, - { 0x232a, "\x30\x09\0" }, - { 0x304c, "\x30\x4b\x30\x99\0" }, - { 0x304e, "\x30\x4d\x30\x99\0" }, - { 0x3050, "\x30\x4f\x30\x99\0" }, - { 0x3052, "\x30\x51\x30\x99\0" }, - { 0x3054, "\x30\x53\x30\x99\0" }, - { 0x3056, "\x30\x55\x30\x99\0" }, - { 0x3058, "\x30\x57\x30\x99\0" }, - { 0x305a, "\x30\x59\x30\x99\0" }, - { 0x305c, "\x30\x5b\x30\x99\0" }, - { 0x305e, "\x30\x5d\x30\x99\0" }, - { 0x3060, "\x30\x5f\x30\x99\0" }, - { 0x3062, "\x30\x61\x30\x99\0" }, - { 0x3065, "\x30\x64\x30\x99\0" }, - { 0x3067, "\x30\x66\x30\x99\0" }, - { 0x3069, "\x30\x68\x30\x99\0" }, - { 0x3070, "\x30\x6f\x30\x99\0" }, - { 0x3071, "\x30\x6f\x30\x9a\0" }, - { 0x3073, "\x30\x72\x30\x99\0" }, - { 0x3074, "\x30\x72\x30\x9a\0" }, - { 0x3076, "\x30\x75\x30\x99\0" }, - { 0x3077, "\x30\x75\x30\x9a\0" }, - { 0x3079, "\x30\x78\x30\x99\0" }, - { 0x307a, "\x30\x78\x30\x9a\0" }, - { 0x307c, "\x30\x7b\x30\x99\0" }, - { 0x307d, "\x30\x7b\x30\x9a\0" }, - { 0x3094, "\x30\x46\x30\x99\0" }, - { 0x309e, "\x30\x9d\x30\x99\0" }, - { 0x30ac, "\x30\xab\x30\x99\0" }, - { 0x30ae, "\x30\xad\x30\x99\0" }, - { 0x30b0, "\x30\xaf\x30\x99\0" }, - { 0x30b2, "\x30\xb1\x30\x99\0" }, - { 0x30b4, "\x30\xb3\x30\x99\0" }, - { 0x30b6, "\x30\xb5\x30\x99\0" }, - { 0x30b8, "\x30\xb7\x30\x99\0" }, - { 0x30ba, "\x30\xb9\x30\x99\0" }, - { 0x30bc, "\x30\xbb\x30\x99\0" }, - { 0x30be, "\x30\xbd\x30\x99\0" }, - { 0x30c0, "\x30\xbf\x30\x99\0" }, - { 0x30c2, "\x30\xc1\x30\x99\0" }, - { 0x30c5, "\x30\xc4\x30\x99\0" }, - { 0x30c7, "\x30\xc6\x30\x99\0" }, - { 0x30c9, "\x30\xc8\x30\x99\0" }, - { 0x30d0, "\x30\xcf\x30\x99\0" }, - { 0x30d1, "\x30\xcf\x30\x9a\0" }, - { 0x30d3, "\x30\xd2\x30\x99\0" }, - { 0x30d4, "\x30\xd2\x30\x9a\0" }, - { 0x30d6, "\x30\xd5\x30\x99\0" }, - { 0x30d7, "\x30\xd5\x30\x9a\0" }, - { 0x30d9, "\x30\xd8\x30\x99\0" }, - { 0x30da, "\x30\xd8\x30\x9a\0" }, - { 0x30dc, "\x30\xdb\x30\x99\0" }, - { 0x30dd, "\x30\xdb\x30\x9a\0" }, - { 0x30f4, "\x30\xa6\x30\x99\0" }, - { 0x30f7, "\x30\xef\x30\x99\0" }, - { 0x30f8, "\x30\xf0\x30\x99\0" }, - { 0x30f9, "\x30\xf1\x30\x99\0" }, - { 0x30fa, "\x30\xf2\x30\x99\0" }, - { 0x30fe, "\x30\xfd\x30\x99\0" }, - { 0xf900, "\x8c\x48\0" }, - { 0xf901, "\x66\xf4\0" }, - { 0xf902, "\x8e\xca\0" }, - { 0xf903, "\x8c\xc8\0" }, - { 0xf904, "\x6e\xd1\0" }, - { 0xf905, "\x4e\x32\0" }, - { 0xf906, "\x53\xe5\0" }, - { 0xf907, "\x9f\x9c\0" }, - { 0xf908, "\x9f\x9c\0" }, - { 0xf909, "\x59\x51\0" }, - { 0xf90a, "\x91\xd1\0" }, - { 0xf90b, "\x55\x87\0" }, - { 0xf90c, "\x59\x48\0" }, - { 0xf90d, "\x61\xf6\0" }, - { 0xf90e, "\x76\x69\0" }, - { 0xf90f, "\x7f\x85\0" }, - { 0xf910, "\x86\x3f\0" }, - { 0xf911, "\x87\xba\0" }, - { 0xf912, "\x88\xf8\0" }, - { 0xf913, "\x90\x8f\0" }, - { 0xf914, "\x6a\x02\0" }, - { 0xf915, "\x6d\x1b\0" }, - { 0xf916, "\x70\xd9\0" }, - { 0xf917, "\x73\xde\0" }, - { 0xf918, "\x84\x3d\0" }, - { 0xf919, "\x91\x6a\0" }, - { 0xf91a, "\x99\xf1\0" }, - { 0xf91b, "\x4e\x82\0" }, - { 0xf91c, "\x53\x75\0" }, - { 0xf91d, "\x6b\x04\0" }, - { 0xf91e, "\x72\x1b\0" }, - { 0xf91f, "\x86\x2d\0" }, - { 0xf920, "\x9e\x1e\0" }, - { 0xf921, "\x5d\x50\0" }, - { 0xf922, "\x6f\xeb\0" }, - { 0xf923, "\x85\xcd\0" }, - { 0xf924, "\x89\x64\0" }, - { 0xf925, "\x62\xc9\0" }, - { 0xf926, "\x81\xd8\0" }, - { 0xf927, "\x88\x1f\0" }, - { 0xf928, "\x5e\xca\0" }, - { 0xf929, "\x67\x17\0" }, - { 0xf92a, "\x6d\x6a\0" }, - { 0xf92b, "\x72\xfc\0" }, - { 0xf92c, "\x90\xce\0" }, - { 0xf92d, "\x4f\x86\0" }, - { 0xf92e, "\x51\xb7\0" }, - { 0xf92f, "\x52\xde\0" }, - { 0xf930, "\x64\xc4\0" }, - { 0xf931, "\x6a\xd3\0" }, - { 0xf932, "\x72\x10\0" }, - { 0xf933, "\x76\xe7\0" }, - { 0xf934, "\x80\x01\0" }, - { 0xf935, "\x86\x06\0" }, - { 0xf936, "\x86\x5c\0" }, - { 0xf937, "\x8d\xef\0" }, - { 0xf938, "\x97\x32\0" }, - { 0xf939, "\x9b\x6f\0" }, - { 0xf93a, "\x9d\xfa\0" }, - { 0xf93b, "\x78\x8c\0" }, - { 0xf93c, "\x79\x7f\0" }, - { 0xf93d, "\x7d\xa0\0" }, - { 0xf93e, "\x83\xc9\0" }, - { 0xf93f, "\x93\x04\0" }, - { 0xf940, "\x9e\x7f\0" }, - { 0xf941, "\x8a\xd6\0" }, - { 0xf942, "\x58\xdf\0" }, - { 0xf943, "\x5f\x04\0" }, - { 0xf944, "\x7c\x60\0" }, - { 0xf945, "\x80\x7e\0" }, - { 0xf946, "\x72\x62\0" }, - { 0xf947, "\x78\xca\0" }, - { 0xf948, "\x8c\xc2\0" }, - { 0xf949, "\x96\xf7\0" }, - { 0xf94a, "\x58\xd8\0" }, - { 0xf94b, "\x5c\x62\0" }, - { 0xf94c, "\x6a\x13\0" }, - { 0xf94d, "\x6d\xda\0" }, - { 0xf94e, "\x6f\x0f\0" }, - { 0xf94f, "\x7d\x2f\0" }, - { 0xf950, "\x7e\x37\0" }, - { 0xf951, "\x96\xfb\0" }, - { 0xf952, "\x52\xd2\0" }, - { 0xf953, "\x80\x8b\0" }, - { 0xf954, "\x51\xdc\0" }, - { 0xf955, "\x51\xcc\0" }, - { 0xf956, "\x7a\x1c\0" }, - { 0xf957, "\x7d\xbe\0" }, - { 0xf958, "\x83\xf1\0" }, - { 0xf959, "\x96\x75\0" }, - { 0xf95a, "\x8b\x80\0" }, - { 0xf95b, "\x62\xcf\0" }, - { 0xf95c, "\x6a\x02\0" }, - { 0xf95d, "\x8a\xfe\0" }, - { 0xf95e, "\x4e\x39\0" }, - { 0xf95f, "\x5b\xe7\0" }, - { 0xf960, "\x60\x12\0" }, - { 0xf961, "\x73\x87\0" }, - { 0xf962, "\x75\x70\0" }, - { 0xf963, "\x53\x17\0" }, - { 0xf964, "\x78\xfb\0" }, - { 0xf965, "\x4f\xbf\0" }, - { 0xf966, "\x5f\xa9\0" }, - { 0xf967, "\x4e\x0d\0" }, - { 0xf968, "\x6c\xcc\0" }, - { 0xf969, "\x65\x78\0" }, - { 0xf96a, "\x7d\x22\0" }, - { 0xf96b, "\x53\xc3\0" }, - { 0xf96c, "\x58\x5e\0" }, - { 0xf96d, "\x77\x01\0" }, - { 0xf96e, "\x84\x49\0" }, - { 0xf96f, "\x8a\xaa\0" }, - { 0xf970, "\x6b\xba\0" }, - { 0xf971, "\x8f\xb0\0" }, - { 0xf972, "\x6c\x88\0" }, - { 0xf973, "\x62\xfe\0" }, - { 0xf974, "\x82\xe5\0" }, - { 0xf975, "\x63\xa0\0" }, - { 0xf976, "\x75\x65\0" }, - { 0xf977, "\x4e\xae\0" }, - { 0xf978, "\x51\x69\0" }, - { 0xf979, "\x51\xc9\0" }, - { 0xf97a, "\x68\x81\0" }, - { 0xf97b, "\x7c\xe7\0" }, - { 0xf97c, "\x82\x6f\0" }, - { 0xf97d, "\x8a\xd2\0" }, - { 0xf97e, "\x91\xcf\0" }, - { 0xf97f, "\x52\xf5\0" }, - { 0xf980, "\x54\x42\0" }, - { 0xf981, "\x59\x73\0" }, - { 0xf982, "\x5e\xec\0" }, - { 0xf983, "\x65\xc5\0" }, - { 0xf984, "\x6f\xfe\0" }, - { 0xf985, "\x79\x2a\0" }, - { 0xf986, "\x95\xad\0" }, - { 0xf987, "\x9a\x6a\0" }, - { 0xf988, "\x9e\x97\0" }, - { 0xf989, "\x9e\xce\0" }, - { 0xf98a, "\x52\x9b\0" }, - { 0xf98b, "\x66\xc6\0" }, - { 0xf98c, "\x6b\x77\0" }, - { 0xf98d, "\x8f\x62\0" }, - { 0xf98e, "\x5e\x74\0" }, - { 0xf98f, "\x61\x90\0" }, - { 0xf990, "\x62\x00\0" }, - { 0xf991, "\x64\x9a\0" }, - { 0xf992, "\x6f\x23\0" }, - { 0xf993, "\x71\x49\0" }, - { 0xf994, "\x74\x89\0" }, - { 0xf995, "\x79\xca\0" }, - { 0xf996, "\x7d\xf4\0" }, - { 0xf997, "\x80\x6f\0" }, - { 0xf998, "\x8f\x26\0" }, - { 0xf999, "\x84\xee\0" }, - { 0xf99a, "\x90\x23\0" }, - { 0xf99b, "\x93\x4a\0" }, - { 0xf99c, "\x52\x17\0" }, - { 0xf99d, "\x52\xa3\0" }, - { 0xf99e, "\x54\xbd\0" }, - { 0xf99f, "\x70\xc8\0" }, - { 0xf9a0, "\x88\xc2\0" }, - { 0xf9a1, "\x8a\xaa\0" }, - { 0xf9a2, "\x5e\xc9\0" }, - { 0xf9a3, "\x5f\xf5\0" }, - { 0xf9a4, "\x63\x7b\0" }, - { 0xf9a5, "\x6b\xae\0" }, - { 0xf9a6, "\x7c\x3e\0" }, - { 0xf9a7, "\x73\x75\0" }, - { 0xf9a8, "\x4e\xe4\0" }, - { 0xf9a9, "\x56\xf9\0" }, - { 0xf9aa, "\x5b\xe7\0" }, - { 0xf9ab, "\x5d\xba\0" }, - { 0xf9ac, "\x60\x1c\0" }, - { 0xf9ad, "\x73\xb2\0" }, - { 0xf9ae, "\x74\x69\0" }, - { 0xf9af, "\x7f\x9a\0" }, - { 0xf9b0, "\x80\x46\0" }, - { 0xf9b1, "\x92\x34\0" }, - { 0xf9b2, "\x96\xf6\0" }, - { 0xf9b3, "\x97\x48\0" }, - { 0xf9b4, "\x98\x18\0" }, - { 0xf9b5, "\x4f\x8b\0" }, - { 0xf9b6, "\x79\xae\0" }, - { 0xf9b7, "\x91\xb4\0" }, - { 0xf9b8, "\x96\xb8\0" }, - { 0xf9b9, "\x60\xe1\0" }, - { 0xf9ba, "\x4e\x86\0" }, - { 0xf9bb, "\x50\xda\0" }, - { 0xf9bc, "\x5b\xee\0" }, - { 0xf9bd, "\x5c\x3f\0" }, - { 0xf9be, "\x65\x99\0" }, - { 0xf9bf, "\x6a\x02\0" }, - { 0xf9c0, "\x71\xce\0" }, - { 0xf9c1, "\x76\x42\0" }, - { 0xf9c2, "\x84\xfc\0" }, - { 0xf9c3, "\x90\x7c\0" }, - { 0xf9c4, "\x9f\x8d\0" }, - { 0xf9c5, "\x66\x88\0" }, - { 0xf9c6, "\x96\x2e\0" }, - { 0xf9c7, "\x52\x89\0" }, - { 0xf9c8, "\x67\x7b\0" }, - { 0xf9c9, "\x67\xf3\0" }, - { 0xf9ca, "\x6d\x41\0" }, - { 0xf9cb, "\x6e\x9c\0" }, - { 0xf9cc, "\x74\x09\0" }, - { 0xf9cd, "\x75\x59\0" }, - { 0xf9ce, "\x78\x6b\0" }, - { 0xf9cf, "\x7d\x10\0" }, - { 0xf9d0, "\x98\x5e\0" }, - { 0xf9d1, "\x51\x6d\0" }, - { 0xf9d2, "\x62\x2e\0" }, - { 0xf9d3, "\x96\x78\0" }, - { 0xf9d4, "\x50\x2b\0" }, - { 0xf9d5, "\x5d\x19\0" }, - { 0xf9d6, "\x6d\xea\0" }, - { 0xf9d7, "\x8f\x2a\0" }, - { 0xf9d8, "\x5f\x8b\0" }, - { 0xf9d9, "\x61\x44\0" }, - { 0xf9da, "\x68\x17\0" }, - { 0xf9db, "\x73\x87\0" }, - { 0xf9dc, "\x96\x86\0" }, - { 0xf9dd, "\x52\x29\0" }, - { 0xf9de, "\x54\x0f\0" }, - { 0xf9df, "\x5c\x65\0" }, - { 0xf9e0, "\x66\x13\0" }, - { 0xf9e1, "\x67\x4e\0" }, - { 0xf9e2, "\x68\xa8\0" }, - { 0xf9e3, "\x6c\xe5\0" }, - { 0xf9e4, "\x74\x06\0" }, - { 0xf9e5, "\x75\xe2\0" }, - { 0xf9e6, "\x7f\x79\0" }, - { 0xf9e7, "\x88\xcf\0" }, - { 0xf9e8, "\x88\xe1\0" }, - { 0xf9e9, "\x91\xcc\0" }, - { 0xf9ea, "\x96\xe2\0" }, - { 0xf9eb, "\x53\x3f\0" }, - { 0xf9ec, "\x6e\xba\0" }, - { 0xf9ed, "\x54\x1d\0" }, - { 0xf9ee, "\x71\xd0\0" }, - { 0xf9ef, "\x74\x98\0" }, - { 0xf9f0, "\x85\xfa\0" }, - { 0xf9f1, "\x96\xa3\0" }, - { 0xf9f2, "\x9c\x57\0" }, - { 0xf9f3, "\x9e\x9f\0" }, - { 0xf9f4, "\x67\x97\0" }, - { 0xf9f5, "\x6d\xcb\0" }, - { 0xf9f6, "\x81\xe8\0" }, - { 0xf9f7, "\x7a\xcb\0" }, - { 0xf9f8, "\x7b\x20\0" }, - { 0xf9f9, "\x7c\x92\0" }, - { 0xf9fa, "\x72\xc0\0" }, - { 0xf9fb, "\x70\x99\0" }, - { 0xf9fc, "\x8b\x58\0" }, - { 0xf9fd, "\x4e\xc0\0" }, - { 0xf9fe, "\x83\x36\0" }, - { 0xf9ff, "\x52\x3a\0" }, - { 0xfa00, "\x52\x07\0" }, - { 0xfa01, "\x5e\xa6\0" }, - { 0xfa02, "\x62\xd3\0" }, - { 0xfa03, "\x7c\xd6\0" }, - { 0xfa04, "\x5b\x85\0" }, - { 0xfa05, "\x6d\x1e\0" }, - { 0xfa06, "\x66\xb4\0" }, - { 0xfa07, "\x8f\x3b\0" }, - { 0xfa08, "\x88\x4c\0" }, - { 0xfa09, "\x96\x4d\0" }, - { 0xfa0a, "\x89\x8b\0" }, - { 0xfa0b, "\x5e\xd3\0" }, - { 0xfa0c, "\x51\x40\0" }, - { 0xfa0d, "\x55\xc0\0" }, - { 0xfa10, "\x58\x5a\0" }, - { 0xfa12, "\x66\x74\0" }, - { 0xfa15, "\x51\xde\0" }, - { 0xfa16, "\x73\x2a\0" }, - { 0xfa17, "\x76\xca\0" }, - { 0xfa18, "\x79\x3c\0" }, - { 0xfa19, "\x79\x5e\0" }, - { 0xfa1a, "\x79\x65\0" }, - { 0xfa1b, "\x79\x8f\0" }, - { 0xfa1c, "\x97\x56\0" }, - { 0xfa1d, "\x7c\xbe\0" }, - { 0xfa1e, "\x7f\xbd\0" }, - { 0xfa20, "\x86\x12\0" }, - { 0xfa22, "\x8a\xf8\0" }, - { 0xfa25, "\x90\x38\0" }, - { 0xfa26, "\x90\xfd\0" }, - { 0xfa2a, "\x98\xef\0" }, - { 0xfa2b, "\x98\xfc\0" }, - { 0xfa2c, "\x99\x28\0" }, - { 0xfa2d, "\x9d\xb4\0" }, - { 0xfb1d, "\x05\xd9\x05\xb4\0" }, - { 0xfb1f, "\x05\xf2\x05\xb7\0" }, - { 0xfb2a, "\x05\xe9\x05\xc1\0" }, - { 0xfb2b, "\x05\xe9\x05\xc2\0" }, - { 0xfb2c, "\x05\xe9\x05\xbc\x05\xc1\0" }, - { 0xfb2d, "\x05\xe9\x05\xbc\x05\xc2\0" }, - { 0xfb2e, "\x05\xd0\x05\xb7\0" }, - { 0xfb2f, "\x05\xd0\x05\xb8\0" }, - { 0xfb30, "\x05\xd0\x05\xbc\0" }, - { 0xfb31, "\x05\xd1\x05\xbc\0" }, - { 0xfb32, "\x05\xd2\x05\xbc\0" }, - { 0xfb33, "\x05\xd3\x05\xbc\0" }, - { 0xfb34, "\x05\xd4\x05\xbc\0" }, - { 0xfb35, "\x05\xd5\x05\xbc\0" }, - { 0xfb36, "\x05\xd6\x05\xbc\0" }, - { 0xfb38, "\x05\xd8\x05\xbc\0" }, - { 0xfb39, "\x05\xd9\x05\xbc\0" }, - { 0xfb3a, "\x05\xda\x05\xbc\0" }, - { 0xfb3b, "\x05\xdb\x05\xbc\0" }, - { 0xfb3c, "\x05\xdc\x05\xbc\0" }, - { 0xfb3e, "\x05\xde\x05\xbc\0" }, - { 0xfb40, "\x05\xe0\x05\xbc\0" }, - { 0xfb41, "\x05\xe1\x05\xbc\0" }, - { 0xfb43, "\x05\xe3\x05\xbc\0" }, - { 0xfb44, "\x05\xe4\x05\xbc\0" }, - { 0xfb46, "\x05\xe6\x05\xbc\0" }, - { 0xfb47, "\x05\xe7\x05\xbc\0" }, - { 0xfb48, "\x05\xe8\x05\xbc\0" }, - { 0xfb49, "\x05\xe9\x05\xbc\0" }, - { 0xfb4a, "\x05\xea\x05\xbc\0" }, - { 0xfb4b, "\x05\xd5\x05\xb9\0" }, - { 0xfb4c, "\x05\xd1\x05\xbf\0" }, - { 0xfb4d, "\x05\xdb\x05\xbf\0" }, - { 0xfb4e, "\x05\xe4\x05\xbf\0" } -}; - -#endif /* DECOMP_H */ diff --git a/guniprop.c b/guniprop.c deleted file mode 100644 index 6b706b136..000000000 --- a/guniprop.c +++ /dev/null @@ -1,471 +0,0 @@ -/* guniprop.c - Unicode character properties. - * - * Copyright (C) 1999 Tom Tromey - * Copyright (C) 2000 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "glib.h" -#include "gunichartables.h" - -#include <config.h> - -#include <stddef.h> - -#define asize(x) ((sizeof (x)) / sizeof (x[0])) - -#define ATTTABLE(Page, Char) \ - ((attr_table[Page] == 0) ? 0 : (attr_table[Page][Char])) - -/* We cheat a bit and cast type values to (char *). We detect these - using the &0xff trick. */ -#define TTYPE(Page, Char) \ - (((GPOINTER_TO_INT(type_table[Page]) & 0xff) == GPOINTER_TO_INT(type_table[Page])) \ - ? GPOINTER_TO_INT(type_table[Page]) \ - : (type_table[Page][Char])) - -#define TYPE(Char) (((Char) > (G_UNICODE_LAST_CHAR)) ? G_UNICODE_UNASSIGNED : TTYPE ((Char) >> 8, (Char) & 0xff)) - -#define ISDIGIT(Type) ((Type) == G_UNICODE_DECIMAL_NUMBER \ - || (Type) == G_UNICODE_LETTER_NUMBER \ - || (Type) == G_UNICODE_OTHER_NUMBER) - -#define ISALPHA(Type) ((Type) == G_UNICODE_LOWERCASE_LETTER \ - || (Type) == G_UNICODE_UPPERCASE_LETTER \ - || (Type) == G_UNICODE_TITLECASE_LETTER \ - || (Type) == G_UNICODE_MODIFIER_LETTER \ - || (Type) == G_UNICODE_OTHER_LETTER) - -/** - * g_unichar_isalnum: - * @c: a Unicode character - * - * Determines whether a character is alphanumeric. - * Given some UTF-8 text, obtain a character value - * with g_utf8_get_char(). - * - * Return value: %TRUE if @c is an alphanumeric character - **/ -gboolean -g_unichar_isalnum (gunichar c) -{ - int t = TYPE (c); - return ISDIGIT (t) || ISALPHA (t); -} - -/** - * g_unichar_isalpha: - * @c: a Unicode character - * - * Determines whether a character is alphabetic (i.e. a letter). - * Given some UTF-8 text, obtain a character value with - * g_utf8_get_char(). - * - * Return value: %TRUE if @c is an alphabetic character - **/ -gboolean -g_unichar_isalpha (gunichar c) -{ - int t = TYPE (c); - return ISALPHA (t); -} - - -/** - * g_unichar_iscntrl: - * @c: a Unicode character - * - * Determines whether a character is a control character. - * Given some UTF-8 text, obtain a character value with - * g_utf8_get_char(). - * - * Return value: %TRUE if @c is a control character - **/ -gboolean -g_unichar_iscntrl (gunichar c) -{ - return TYPE (c) == G_UNICODE_CONTROL; -} - -/** - * g_unichar_isdigit: - * @c: a Unicode character - * - * Determines whether a character is numeric (i.e. a digit). This - * covers ASCII 0-9 and also digits in other languages/scripts. Given - * some UTF-8 text, obtain a character value with g_utf8_get_char(). - * - * Return value: %TRUE if @c is a digit - **/ -gboolean -g_unichar_isdigit (gunichar c) -{ - return TYPE (c) == G_UNICODE_DECIMAL_NUMBER; -} - - -/** - * g_unichar_isgraph: - * @c: a Unicode character - * - * Determines whether a character is printable and not a space - * (returns %FALSE for control characters, format characters, and - * spaces). g_unichar_isprint() is similar, but returns %TRUE for - * spaces. Given some UTF-8 text, obtain a character value with - * g_utf8_get_char(). - * - * Return value: %TRUE if @c is printable unless it's a space - **/ -gboolean -g_unichar_isgraph (gunichar c) -{ - int t = TYPE (c); - return (t != G_UNICODE_CONTROL - && t != G_UNICODE_FORMAT - && t != G_UNICODE_UNASSIGNED - && t != G_UNICODE_PRIVATE_USE - && t != G_UNICODE_SURROGATE - && t != G_UNICODE_SPACE_SEPARATOR); -} - -/** - * g_unichar_islower: - * @c: a Unicode character - * - * Determines whether a character is a lowercase letter. - * Given some UTF-8 text, obtain a character value with - * g_utf8_get_char(). - * - * Return value: %TRUE if @c is a lowercase letter - **/ -gboolean -g_unichar_islower (gunichar c) -{ - return TYPE (c) == G_UNICODE_LOWERCASE_LETTER; -} - - -/** - * g_unichar_isprint: - * @c: a Unicode character - * - * Determines whether a character is printable. - * Unlike g_unichar_isgraph(), returns %TRUE for spaces. - * Given some UTF-8 text, obtain a character value with - * g_utf8_get_char(). - * - * Return value: %TRUE if @c is printable - **/ -gboolean -g_unichar_isprint (gunichar c) -{ - int t = TYPE (c); - return (t != G_UNICODE_CONTROL - && t != G_UNICODE_FORMAT - && t != G_UNICODE_UNASSIGNED - && t != G_UNICODE_PRIVATE_USE - && t != G_UNICODE_SURROGATE); -} - -/** - * g_unichar_ispunct: - * @c: a Unicode character - * - * Determines whether a character is punctuation. - * Given some UTF-8 text, obtain a character value with - * g_utf8_get_char(). - * - * Return value: %TRUE if @c is a punctuation character - **/ -gboolean -g_unichar_ispunct (gunichar c) -{ - int t = TYPE (c); - return (t == G_UNICODE_CONNECT_PUNCTUATION || t == G_UNICODE_DASH_PUNCTUATION - || t == G_UNICODE_CLOSE_PUNCTUATION || t == G_UNICODE_FINAL_PUNCTUATION - || t == G_UNICODE_INITIAL_PUNCTUATION || t == G_UNICODE_OTHER_PUNCTUATION - || t == G_UNICODE_OPEN_PUNCTUATION); -} - -/** - * g_unichar_isspace: - * @c: a Unicode character - * - * Determines whether a character is a space, tab, or line separator - * (newline, carriage return, etc.). Given some UTF-8 text, obtain a - * character value with g_utf8_get_char(). - * - * (Note: don't use this to do word breaking; you have to use - * Pango or equivalent to get word breaking right, the algorithm - * is fairly complex.) - * - * Return value: %TRUE if @c is a punctuation character - **/ -gboolean -g_unichar_isspace (gunichar c) -{ - switch (c) - { - /* special-case these since Unicode thinks they are not spaces */ - case '\t': - case '\n': - case '\r': - case '\f': - case '\v': /* vertical tab - as if anyone has ever used this... */ - return TRUE; - break; - - default: - { - int t = TYPE (c); - return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR - || t == G_UNICODE_PARAGRAPH_SEPARATOR); - } - break; - } -} - -/** - * g_unichar_isupper: - * @c: a unicode character - * - * Determines if a character is uppercase. - * - * Return value: %TRUE if @c is an uppercase character. - **/ -gboolean -g_unichar_isupper (gunichar c) -{ - return TYPE (c) == G_UNICODE_UPPERCASE_LETTER; -} - -/** - * g_unichar_istitle: - * @c: a unicode character - * - * Determines if a character is titlecase. Some characters in - * Unicode which are composites, such as the DZ digraph - * have three case variants instead of just two. The titlecase - * form is used at the beginning of a word where only the - * first letter is capitalized. The titlecase form of the DZ - * digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z - * - * Return value: %TRUE if the character is titlecase. - **/ -gboolean -g_unichar_istitle (gunichar c) -{ - unsigned int i; - for (i = 0; i < asize (title_table); ++i) - if (title_table[i][0] == c) - return 1; - return 0; -} - -/** - * g_unichar_isxdigit: - * @c: a unicode character. - * - * Determines if a characters is a hexidecimal digit - * - * Return value: %TRUE if the character is a hexadecimal digit. - **/ -gboolean -g_unichar_isxdigit (gunichar c) -{ - int t = TYPE (c); - return ((c >= 'a' && c <= 'f') - || (c >= 'A' && c <= 'F') - || ISDIGIT (t)); -} - -/** - * g_unichar_isdefined: - * @c: a unicode character - * - * Determines if a given character is assigned in the Unicode - * standard. - * - * Return value: %TRUE if the character has an assigned value. - **/ -gboolean -g_unichar_isdefined (gunichar c) -{ - int t = TYPE (c); - return t != G_UNICODE_UNASSIGNED; -} - -/** - * g_unichar_iswide: - * @c: a unicode character - * - * Determines if a character is typically rendered in a double-width - * cell. - * - * Return value: %TRUE if the character is wide. - **/ -/* This function stolen from Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>. */ -gboolean -g_unichar_iswide (gunichar c) -{ - if (c < 0x1100) - return 0; - - return ((c >= 0x1100 && c <= 0x115f) /* Hangul Jamo */ - || (c >= 0x2e80 && c <= 0xa4cf && (c & ~0x0011) != 0x300a && - c != 0x303f) /* CJK ... Yi */ - || (c >= 0xac00 && c <= 0xd7a3) /* Hangul Syllables */ - || (c >= 0xf900 && c <= 0xfaff) /* CJK Compatibility Ideographs */ - || (c >= 0xfe30 && c <= 0xfe6f) /* CJK Compatibility Forms */ - || (c >= 0xff00 && c <= 0xff5f) /* Fullwidth Forms */ - || (c >= 0xffe0 && c <= 0xffe6)); -} - -/** - * g_unichar_toupper: - * @c: a unicode character - * - * Convert a character to uppercase. - * - * Return value: the result of converting @c to uppercase. - * If @c is not an lowercase or titlecase character, - * @c is returned unchanged. - **/ -gunichar -g_unichar_toupper (gunichar c) -{ - int t = TYPE (c); - if (t == G_UNICODE_LOWERCASE_LETTER) - return ATTTABLE (c >> 8, c & 0xff); - else if (t == G_UNICODE_TITLECASE_LETTER) - { - unsigned int i; - for (i = 0; i < asize (title_table); ++i) - { - if (title_table[i][0] == c) - return title_table[i][1]; - } - } - return c; -} - -/** - * g_unichar_tolower: - * @c: a unicode character. - * - * Convert a character to lower case - * - * Return value: the result of converting @c to lower case. - * If @c is not an upperlower or titlecase character, - * @c is returned unchanged. - **/ -gunichar -g_unichar_tolower (gunichar c) -{ - int t = TYPE (c); - if (t == G_UNICODE_UPPERCASE_LETTER) - return ATTTABLE (c >> 8, c & 0xff); - else if (t == G_UNICODE_TITLECASE_LETTER) - { - unsigned int i; - for (i = 0; i < asize (title_table); ++i) - { - if (title_table[i][0] == c) - return title_table[i][2]; - } - } - return c; -} - -/** - * g_unichar_totitle: - * @c: a unicode character - * - * Convert a character to the titlecase - * - * Return value: the result of converting @c to titlecase. - * If @c is not an uppercase or lowercase character, - * @c is returned unchanged. - **/ -gunichar -g_unichar_totitle (gunichar c) -{ - unsigned int i; - for (i = 0; i < asize (title_table); ++i) - { - if (title_table[i][0] == c || title_table[i][1] == c - || title_table[i][2] == c) - return title_table[i][0]; - } - return (TYPE (c) == G_UNICODE_LOWERCASE_LETTER - ? ATTTABLE (c >> 8, c & 0xff) - : c); -} - -/** - * g_unichar_digit_value: - * @c: a unicode character - * - * Determines the numeric value of a character as a decimal - * degital. - * - * Return value: If @c is a decimal digit (according to - * `g_unichar_isdigit'), its numeric value. Otherwise, -1. - **/ -int -g_unichar_digit_value (gunichar c) -{ - if (TYPE (c) == G_UNICODE_DECIMAL_NUMBER) - return ATTTABLE (c >> 8, c & 0xff); - return -1; -} - -/** - * g_unichar_xdigit_value: - * @c: a unicode character - * - * Determines the numeric value of a character as a hexidecimal - * degital. - * - * Return value: If @c is a hex digit (according to - * `g_unichar_isxdigit'), its numeric value. Otherwise, -1. - **/ -int -g_unichar_xdigit_value (gunichar c) -{ - if (c >= 'A' && c <= 'F') - return c - 'A' + 1; - if (c >= 'a' && c <= 'f') - return c - 'a' + 1; - if (TYPE (c) == G_UNICODE_DECIMAL_NUMBER) - return ATTTABLE (c >> 8, c & 0xff); - return -1; -} - -/** - * g_unichar_type: - * @c: a unicode character - * - * Classifies a unicode character by type. - * - * Return value: the type of the character. - **/ -GUnicodeType -g_unichar_type (gunichar c) -{ - return TYPE (c); -} diff --git a/gutf8.c b/gutf8.c deleted file mode 100644 index d1863e927..000000000 --- a/gutf8.c +++ /dev/null @@ -1,1482 +0,0 @@ -/* gutf8.c - Operations on UTF-8 strings. - * - * Copyright (C) 1999 Tom Tromey - * Copyright (C) 2000 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include <config.h> - -#include <stdlib.h> -#ifdef HAVE_CODESET -#include <langinfo.h> -#endif -#include <string.h> - -#include "glib.h" - -#ifdef G_PLATFORM_WIN32 -#include <stdio.h> -#define STRICT -#include <windows.h> -#undef STRICT -#endif - -#include "glibintl.h" - -#define UTF8_COMPUTE(Char, Mask, Len) \ - if (Char < 128) \ - { \ - Len = 1; \ - Mask = 0x7f; \ - } \ - else if ((Char & 0xe0) == 0xc0) \ - { \ - Len = 2; \ - Mask = 0x1f; \ - } \ - else if ((Char & 0xf0) == 0xe0) \ - { \ - Len = 3; \ - Mask = 0x0f; \ - } \ - else if ((Char & 0xf8) == 0xf0) \ - { \ - Len = 4; \ - Mask = 0x07; \ - } \ - else if ((Char & 0xfc) == 0xf8) \ - { \ - Len = 5; \ - Mask = 0x03; \ - } \ - else if ((Char & 0xfe) == 0xfc) \ - { \ - Len = 6; \ - Mask = 0x01; \ - } \ - else \ - Len = -1; - -#define UTF8_LENGTH(Char) \ - ((Char) < 0x80 ? 1 : \ - ((Char) < 0x800 ? 2 : \ - ((Char) < 0x10000 ? 3 : \ - ((Char) < 0x200000 ? 4 : \ - ((Char) < 0x4000000 ? 5 : 6))))) - - -#define UTF8_GET(Result, Chars, Count, Mask, Len) \ - (Result) = (Chars)[0] & (Mask); \ - for ((Count) = 1; (Count) < (Len); ++(Count)) \ - { \ - if (((Chars)[(Count)] & 0xc0) != 0x80) \ - { \ - (Result) = -1; \ - break; \ - } \ - (Result) <<= 6; \ - (Result) |= ((Chars)[(Count)] & 0x3f); \ - } - -#define UNICODE_VALID(Char) \ - ((Char) < 0x110000 && \ - ((Char) < 0xD800 || (Char) >= 0xE000) && \ - (Char) != 0xFFFE && (Char) != 0xFFFF) - - -gchar g_utf8_skip[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, - 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, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - 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 -}; - -/** - * g_utf8_find_prev_char: - * @str: pointer to the beginning of a UTF-8 string - * @p: pointer to some position within @str - * - * Given a position @p with a UTF-8 encoded string @str, find the start - * of the previous UTF-8 character starting before @p. Returns %NULL if no - * UTF-8 characters are present in @p before @str. - * - * @p does not have to be at the beginning of a UTF-8 chracter. No check - * is made to see if the character found is actually valid other than - * it starts with an appropriate byte. - * - * Return value: a pointer to the found character or %NULL. - **/ -gchar * -g_utf8_find_prev_char (const char *str, - const char *p) -{ - for (--p; p > str; --p) - { - if ((*p & 0xc0) != 0x80) - return (gchar *)p; - } - return NULL; -} - -/** - * g_utf8_find_next_char: - * @p: a pointer to a position within a UTF-8 encoded string - * @end: a pointer to the end of the string, or %NULL to indicate - * that the string is NULL terminated, in which case - * the returned value will be - * - * Find the start of the next utf-8 character in the string after @p - * - * @p does not have to be at the beginning of a UTF-8 chracter. No check - * is made to see if the character found is actually valid other than - * it starts with an appropriate byte. - * - * Return value: a pointer to the found character or %NULL - **/ -gchar * -g_utf8_find_next_char (const gchar *p, - const gchar *end) -{ - if (*p) - { - if (end) - for (++p; p < end && (*p & 0xc0) == 0x80; ++p) - ; - else - for (++p; (*p & 0xc0) == 0x80; ++p) - ; - } - return (p == end) ? NULL : (gchar *)p; -} - -/** - * g_utf8_prev_char: - * @p: a pointer to a position within a UTF-8 encoded string - * - * Find the previous UTF-8 character in the string before @p. - * - * @p does not have to be at the beginning of a UTF-8 character. No check - * is made to see if the character found is actually valid other than - * it starts with an appropriate byte. If @p might be the first - * character of the string, you must use g_utf8_find_prev_char instead. - * - * Return value: a pointer to the found character. - **/ -gchar * -g_utf8_prev_char (const gchar *p) -{ - while (TRUE) - { - p--; - if ((*p & 0xc0) != 0x80) - return (gchar *)p; - } -} - -/** - * g_utf8_strlen: - * @p: pointer to the start of a UTF-8 string. - * @max: the maximum number of bytes to examine. If @max - * is less than 0, then the string is assumed to be - * nul-terminated. - * - * Return value: the length of the string in characters - **/ -glong -g_utf8_strlen (const gchar *p, - gssize max) -{ - glong len = 0; - const gchar *start = p; - - if (max < 0) - { - while (*p) - { - p = g_utf8_next_char (p); - ++len; - } - } - else - { - if (max == 0 || !*p) - return 0; - - p = g_utf8_next_char (p); - - while (p - start < max && *p) - { - ++len; - p = g_utf8_next_char (p); - } - - /* only do the last len increment if we got a complete - * char (don't count partial chars) - */ - if (p - start == max) - ++len; - } - - return len; -} - -/** - * g_utf8_get_char: - * @p: a pointer to unicode character encoded as UTF-8 - * - * Convert a sequence of bytes encoded as UTF-8 to a unicode character. - * If @p does not point to a valid UTF-8 encoded character, results are - * undefined. - * - * Return value: the resulting character - **/ -gunichar -g_utf8_get_char (const gchar *p) -{ - int i, mask = 0, len; - gunichar result; - unsigned char c = (unsigned char) *p; - - UTF8_COMPUTE (c, mask, len); - if (len == -1) - return (gunichar)-1; - UTF8_GET (result, p, i, mask, len); - - return result; -} - -/** - * g_utf8_offset_to_pointer: - * @str: a UTF-8 encoded string - * @offset: a character offset within the string. - * - * Converts from an integer character offset to a pointer to a position - * within the string. - * - * Return value: the resulting pointer - **/ -gchar * -g_utf8_offset_to_pointer (const gchar *str, - glong offset) -{ - const gchar *s = str; - while (offset--) - s = g_utf8_next_char (s); - - return (gchar *)s; -} - -/** - * g_utf8_pointer_to_offset: - * @str: a UTF-8 encoded string - * @pos: a pointer to a position within @str - * - * Converts from a pointer to position within a string to a integer - * character offset - * - * Return value: the resulting character offset - **/ -glong -g_utf8_pointer_to_offset (const gchar *str, - const gchar *pos) -{ - const gchar *s = str; - glong offset = 0; - - while (s < pos) - { - s = g_utf8_next_char (s); - offset++; - } - - return offset; -} - - -/** - * g_utf8_strncpy: - * @dest: buffer to fill with characters from @src - * @src: UTF-8 string - * @n: character count - * - * Like the standard C strncpy() function, but copies a given number - * of characters instead of a given number of bytes. The @src string - * must be valid UTF-8 encoded text. (Use g_utf8_validate() on all - * text before trying to use UTF-8 utility functions with it.) - * - * Return value: @dest - **/ -gchar * -g_utf8_strncpy (gchar *dest, const gchar *src, size_t n) -{ - const gchar *s = src; - while (n && *s) - { - s = g_utf8_next_char(s); - n--; - } - strncpy(dest, src, s - src); - dest[s - src] = 0; - return dest; -} - -static gboolean -g_utf8_get_charset_internal (char **a) -{ - char *charset = getenv("CHARSET"); - - if (charset && a && ! *a) - *a = charset; - - if (charset && strstr (charset, "UTF-8")) - return TRUE; - -#ifdef HAVE_CODESET - charset = nl_langinfo(CODESET); - if (charset) - { - if (a && ! *a) - *a = charset; - if (strcmp (charset, "UTF-8") == 0) - return TRUE; - } -#endif - -#if 0 /* #ifdef _NL_CTYPE_CODESET_NAME */ - charset = nl_langinfo (_NL_CTYPE_CODESET_NAME); - if (charset) - { - if (a && ! *a) - *a = charset; - if (strcmp (charset, "UTF-8") == 0) - return TRUE; - } -#endif - -#ifdef G_PLATFORM_WIN32 - if (a && ! *a) - { - static char codepage[10]; - - sprintf (codepage, "CP%d", GetACP ()); - *a = codepage; - /* What about codepage 1200? Is that UTF-8? */ - return FALSE; - } -#else - if (a && ! *a) - *a = "US-ASCII"; -#endif - - /* Assume this for compatibility at present. */ - return FALSE; -} - -static int utf8_locale_cache = -1; -static char *utf8_charset_cache = NULL; - -/** - * g_get_charset: - * @charset: return location for character set name - * - * Obtains the character set for the current locale; you might use - * this character set as an argument to g_convert(), to convert from - * the current locale's encoding to some other encoding. (Frequently - * g_locale_to_utf8() and g_locale_from_utf8() are nice shortcuts, - * though.) - * - * The return value is %TRUE if the locale's encoding is UTF-8, in that - * case you can perhaps avoid calling g_convert(). - * - * The string returned in @charset is not allocated, and should not be - * freed. - * - * Return value: %TRUE if the returned charset is UTF-8 - **/ -gboolean -g_get_charset (G_CONST_RETURN char **charset) -{ - if (utf8_locale_cache != -1) - { - if (charset) - *charset = utf8_charset_cache; - return utf8_locale_cache; - } - utf8_locale_cache = g_utf8_get_charset_internal (&utf8_charset_cache); - if (charset) - *charset = utf8_charset_cache; - return utf8_locale_cache; -} - -/* unicode_strchr */ - -/** - * g_unichar_to_utf8: - * @c: a ISO10646 character code - * @outbuf: output buffer, must have at least 6 bytes of space. - * If %NULL, the length will be computed and returned - * and nothing will be written to @out. - * - * Convert a single character to utf8 - * - * Return value: number of bytes written - **/ -int -g_unichar_to_utf8 (gunichar c, - gchar *outbuf) -{ - guint len = 0; - int first; - int i; - - if (c < 0x80) - { - first = 0; - len = 1; - } - else if (c < 0x800) - { - first = 0xc0; - len = 2; - } - else if (c < 0x10000) - { - first = 0xe0; - len = 3; - } - else if (c < 0x200000) - { - first = 0xf0; - len = 4; - } - else if (c < 0x4000000) - { - first = 0xf8; - len = 5; - } - else - { - first = 0xfc; - len = 6; - } - - if (outbuf) - { - for (i = len - 1; i > 0; --i) - { - outbuf[i] = (c & 0x3f) | 0x80; - c >>= 6; - } - outbuf[0] = c | first; - } - - return len; -} - -/** - * g_utf8_strchr: - * @p: a nul-terminated utf-8 string - * @p_len: the maximum length of p - * @c: a iso-10646 character - * - * Find the leftmost occurence of the given iso-10646 character - * in a UTF-8 string, while limiting the search to p_len bytes. - * If len is -1, allow unbounded search. - * - * Return value: NULL if the string does not contain the character, otherwise, a - * a pointer to the start of the leftmost of the character in the string. - **/ -gchar * -g_utf8_strchr (const char *p, - gssize p_len, - gunichar c) -{ - gchar ch[10]; - - gint len = g_unichar_to_utf8 (c, ch); - ch[len] = '\0'; - - return g_strstr_len (p, p_len, ch); -} - - -/** - * g_utf8_strrchr: - * @p: a nul-terminated utf-8 string - * @p_len: the maximum length of p - * @c: a iso-10646 character/ - * - * Find the rightmost occurence of the given iso-10646 character - * in a UTF-8 string, while limiting the search to p_len bytes. - * If len is -1, allow unbounded search. - * - * Return value: NULL if the string does not contain the character, otherwise, a - * a pointer to the start of the rightmost of the character in the string. - **/ -gchar * -g_utf8_strrchr (const char *p, - gssize p_len, - gunichar c) -{ - gchar ch[10]; - - gint len = g_unichar_to_utf8 (c, ch); - ch[len] = '\0'; - - return g_strrstr_len (p, p_len, ch); -} - - -/* Like g_utf8_get_char, but take a maximum length - * and return (gunichar)-2 on incomplete trailing character - */ -static inline gunichar -g_utf8_get_char_extended (const gchar *p, gsize max_len) -{ - guint i, len; - gunichar wc = (guchar) *p; - - if (wc < 0x80) - { - return wc; - } - else if (wc < 0xc0) - { - return (gunichar)-1; - } - else if (wc < 0xe0) - { - len = 2; - wc &= 0x1f; - } - else if (wc < 0xf0) - { - len = 3; - wc &= 0x0f; - } - else if (wc < 0xf8) - { - len = 4; - wc &= 0x07; - } - else if (wc < 0xfc) - { - len = 5; - wc &= 0x03; - } - else if (wc < 0xfe) - { - len = 6; - wc &= 0x01; - } - else - { - return (gunichar)-1; - } - - if (max_len >= 0 && len > max_len) - { - for (i = 1; i < max_len; i++) - { - if ((((guchar *)p)[i] & 0xc0) != 0x80) - return (gunichar)-1; - } - return (gunichar)-2; - } - - for (i = 1; i < len; ++i) - { - gunichar ch = ((guchar *)p)[i]; - - if ((ch & 0xc0) != 0x80) - { - if (ch) - return (gunichar)-1; - else - return (gunichar)-2; - } - - wc <<= 6; - wc |= (ch & 0x3f); - } - - if (UTF8_LENGTH(wc) != len) - return (gunichar)-1; - - return wc; -} - -/** - * g_utf8_to_ucs4_fast: - * @str: a UTF-8 encoded string - * @len: the maximum length of @str to use. If < 0, then - * the string is %NULL terminated. - * @items_written: location to store the number of characters in the - * result, or %NULL. - * - * Convert a string from UTF-8 to a 32-bit fixed width - * representation as UCS-4, assuming valid UTF-8 input. - * This function is roughly twice as fast as g_utf8_to_ucs4() - * but does no error checking on the input. - * - * Return value: a pointer to a newly allocated UCS-4 string. - * This value must be freed with g_free() - **/ -gunichar * -g_utf8_to_ucs4_fast (const gchar *str, - glong len, - glong *items_written) -{ - gint j, charlen; - gunichar *result; - gint n_chars, i; - const gchar *p; - - g_return_val_if_fail (str != NULL, NULL); - - p = str; - n_chars = 0; - if (len < 0) - { - while (*p) - { - p = g_utf8_next_char (p); - ++n_chars; - } - } - else - { - while (p < str + len && *p) - { - p = g_utf8_next_char (p); - ++n_chars; - } - } - - result = g_new (gunichar, n_chars + 1); - - p = str; - for (i=0; i < n_chars; i++) - { - gunichar wc = ((unsigned char *)p)[0]; - - if (wc < 0x80) - { - result[i] = wc; - p++; - } - else - { - if (wc < 0xe0) - { - charlen = 2; - wc &= 0x1f; - } - else if (wc < 0xf0) - { - charlen = 3; - wc &= 0x0f; - } - else if (wc < 0xf8) - { - charlen = 4; - wc &= 0x07; - } - else if (wc < 0xfc) - { - charlen = 5; - wc &= 0x03; - } - else - { - charlen = 6; - wc &= 0x01; - } - - for (j = 1; j < charlen; j++) - { - wc <<= 6; - wc |= ((unsigned char *)p)[j] & 0x3f; - } - - result[i] = wc; - p += charlen; - } - } - result[i] = 0; - - if (items_written) - *items_written = i; - - return result; -} - -/** - * g_utf8_to_ucs4: - * @str: a UTF-8 encoded string - * @len: the maximum length of @str to use. If < 0, then - * the string is %NULL terminated. - * @items_read: location to store number of bytes read, or %NULL. - * If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be - * returned in case @str contains a trailing partial - * character. If an error occurs then the index of the - * invalid input is stored here. - * @items_written: location to store number of characters written or %NULL. - * The value here stored does not include the trailing 0 - * character. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError other than - * %G_CONVERT_ERROR_NO_CONVERSION may occur. - * - * Convert a string from UTF-8 to a 32-bit fixed width - * representation as UCS-4. A trailing 0 will be added to the - * string after the converted text. - * - * Return value: a pointer to a newly allocated UCS-4 string. - * This value must be freed with g_free(). If an - * error occurs, %NULL will be returned and - * @error set. - **/ -gunichar * -g_utf8_to_ucs4 (const gchar *str, - glong len, - glong *items_read, - glong *items_written, - GError **error) -{ - gunichar *result = NULL; - gint n_chars, i; - const gchar *in; - - in = str; - n_chars = 0; - while ((len < 0 || str + len - in > 0) && *in) - { - gunichar wc = g_utf8_get_char_extended (in, str + len - in); - if (wc & 0x80000000) - { - if (wc == (gunichar)-2) - { - if (items_read) - break; - else - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT, - _("Partial character sequence at end of input")); - } - else - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid byte sequence in conversion input")); - - goto err_out; - } - - n_chars++; - - in = g_utf8_next_char (in); - } - - result = g_new (gunichar, n_chars + 1); - - in = str; - for (i=0; i < n_chars; i++) - { - result[i] = g_utf8_get_char (in); - in = g_utf8_next_char (in); - } - result[i] = 0; - - if (items_written) - *items_written = n_chars; - - err_out: - if (items_read) - *items_read = in - str; - - return result; -} - -/** - * g_ucs4_to_utf8: - * @str: a UCS-4 encoded string - * @len: the maximum length of @str to use. If < 0, then - * the string is %NULL terminated. - * @items_read: location to store number of characters read read, or %NULL. - * @items_written: location to store number of bytes written or %NULL. - * The value here stored does not include the trailing 0 - * byte. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError other than - * %G_CONVERT_ERROR_NO_CONVERSION may occur. - * - * Convert a string from a 32-bit fixed width representation as UCS-4. - * to UTF-8. The result will be terminated with a 0 byte. - * - * Return value: a pointer to a newly allocated UTF-8 string. - * This value must be freed with g_free(). If an - * error occurs, %NULL will be returned and - * @error set. - **/ -gchar * -g_ucs4_to_utf8 (const gunichar *str, - glong len, - glong *items_read, - glong *items_written, - GError **error) -{ - gint result_length; - gchar *result = NULL; - gchar *p; - gint i; - - result_length = 0; - for (i = 0; len < 0 || i < len ; i++) - { - if (!str[i]) - break; - - if (str[i] >= 0x80000000) - { - if (items_read) - *items_read = i; - - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Character out of range for UTF-8")); - goto err_out; - } - - result_length += UTF8_LENGTH (str[i]); - } - - result = g_malloc (result_length + 1); - p = result; - - i = 0; - while (p < result + result_length) - p += g_unichar_to_utf8 (str[i++], p); - - *p = '\0'; - - if (items_written) - *items_written = p - result; - - err_out: - if (items_read) - *items_read = i; - - return result; -} - -#define SURROGATE_VALUE(h,l) (((h) - 0xd800) * 0x400 + (l) - 0xdc00 + 0x10000) - -/** - * g_utf16_to_utf8: - * @str: a UTF-16 encoded string - * @len: the maximum length of @str to use. If < 0, then - * the string is terminated with a 0 character. - * @items_read: location to store number of words read, or %NULL. - * If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be - * returned in case @str contains a trailing partial - * character. If an error occurs then the index of the - * invalid input is stored here. - * @items_written: location to store number of bytes written, or %NULL. - * The value stored here does not include the trailing - * 0 byte. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError other than - * %G_CONVERT_ERROR_NO_CONVERSION may occur. - * - * Convert a string from UTF-16 to UTF-8. The result will be - * terminated with a 0 byte. - * - * Return value: a pointer to a newly allocated UTF-8 string. - * This value must be freed with g_free(). If an - * error occurs, %NULL will be returned and - * @error set. - **/ -gchar * -g_utf16_to_utf8 (const gunichar2 *str, - glong len, - glong *items_read, - glong *items_written, - GError **error) -{ - /* This function and g_utf16_to_ucs4 are almost exactly identical - The lines that differ - * are marked. - */ - const gunichar2 *in; - gchar *out; - gchar *result = NULL; - gint n_bytes; - gunichar high_surrogate; - - g_return_val_if_fail (str != 0, NULL); - - n_bytes = 0; - in = str; - high_surrogate = 0; - while ((len < 0 || in - str < len) && *in) - { - gunichar2 c = *in; - gunichar wc; - - if (c >= 0xdc00 && c < 0xe000) /* low surrogate */ - { - if (high_surrogate) - { - wc = SURROGATE_VALUE (high_surrogate, c); - high_surrogate = 0; - } - else - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid sequence in conversion input")); - goto err_out; - } - } - else - { - if (high_surrogate) - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid sequence in conversion input")); - goto err_out; - } - - if (c >= 0xd800 && c < 0xdc00) /* high surrogate */ - { - high_surrogate = c; - goto next1; - } - else - wc = c; - } - - /********** DIFFERENT for UTF8/UCS4 **********/ - n_bytes += UTF8_LENGTH (wc); - - next1: - in++; - } - - if (high_surrogate && !items_read) - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT, - _("Partial character sequence at end of input")); - goto err_out; - } - - /* At this point, everything is valid, and we just need to convert - */ - /********** DIFFERENT for UTF8/UCS4 **********/ - result = g_malloc (n_bytes + 1); - - high_surrogate = 0; - out = result; - in = str; - while (out < result + n_bytes) - { - gunichar2 c = *in; - gunichar wc; - - if (c >= 0xdc00 && c < 0xe000) /* low surrogate */ - { - wc = SURROGATE_VALUE (high_surrogate, c); - high_surrogate = 0; - } - else if (c >= 0xd800 && c < 0xdc00) /* high surrogate */ - { - high_surrogate = c; - goto next2; - } - else - wc = c; - - /********** DIFFERENT for UTF8/UCS4 **********/ - out += g_unichar_to_utf8 (wc, out); - - next2: - in++; - } - - /********** DIFFERENT for UTF8/UCS4 **********/ - *out = '\0'; - - if (items_written) - /********** DIFFERENT for UTF8/UCS4 **********/ - *items_written = out - result; - - err_out: - if (items_read) - *items_read = in - str; - - return result; -} - -/** - * g_utf16_to_ucs4: - * @str: a UTF-16 encoded string - * @len: the maximum length of @str to use. If < 0, then - * the string is terminated with a 0 character. - * @items_read: location to store number of words read, or %NULL. - * If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be - * returned in case @str contains a trailing partial - * character. If an error occurs then the index of the - * invalid input is stored here. - * @items_written: location to store number of characters written, or %NULL. - * The value stored here does not include the trailing - * 0 character. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError other than - * %G_CONVERT_ERROR_NO_CONVERSION may occur. - * - * Convert a string from UTF-16 to UCS-4. The result will be - * terminated with a 0 character. - * - * Return value: a pointer to a newly allocated UCS-4 string. - * This value must be freed with g_free(). If an - * error occurs, %NULL will be returned and - * @error set. - **/ -gunichar * -g_utf16_to_ucs4 (const gunichar2 *str, - glong len, - glong *items_read, - glong *items_written, - GError **error) -{ - const gunichar2 *in; - gchar *out; - gchar *result = NULL; - gint n_bytes; - gunichar high_surrogate; - - g_return_val_if_fail (str != 0, NULL); - - n_bytes = 0; - in = str; - high_surrogate = 0; - while ((len < 0 || in - str < len) && *in) - { - gunichar2 c = *in; - gunichar wc; - - if (c >= 0xdc00 && c < 0xe000) /* low surrogate */ - { - if (high_surrogate) - { - wc = SURROGATE_VALUE (high_surrogate, c); - high_surrogate = 0; - } - else - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid sequence in conversion input")); - goto err_out; - } - } - else - { - if (high_surrogate) - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid sequence in conversion input")); - goto err_out; - } - - if (c >= 0xd800 && c < 0xdc00) /* high surrogate */ - { - high_surrogate = c; - goto next1; - } - else - wc = c; - } - - /********** DIFFERENT for UTF8/UCS4 **********/ - n_bytes += sizeof (gunichar); - - next1: - in++; - } - - if (high_surrogate && !items_read) - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT, - _("Partial character sequence at end of input")); - goto err_out; - } - - /* At this point, everything is valid, and we just need to convert - */ - /********** DIFFERENT for UTF8/UCS4 **********/ - result = g_malloc (n_bytes + 4); - - high_surrogate = 0; - out = result; - in = str; - while (out < result + n_bytes) - { - gunichar2 c = *in; - gunichar wc; - - if (c >= 0xdc00 && c < 0xe000) /* low surrogate */ - { - wc = SURROGATE_VALUE (high_surrogate, c); - high_surrogate = 0; - } - else if (c >= 0xd800 && c < 0xdc00) /* high surrogate */ - { - high_surrogate = c; - goto next2; - } - else - wc = c; - - /********** DIFFERENT for UTF8/UCS4 **********/ - *(gunichar *)out = wc; - out += sizeof (gunichar); - - next2: - in++; - } - - /********** DIFFERENT for UTF8/UCS4 **********/ - *(gunichar *)out = 0; - - if (items_written) - /********** DIFFERENT for UTF8/UCS4 **********/ - *items_written = (out - result) / sizeof (gunichar); - - err_out: - if (items_read) - *items_read = in - str; - - return (gunichar *)result; -} - -/** - * g_utf8_to_utf16: - * @str: a UTF-8 encoded string - * @len: the maximum length of @str to use. If < 0, then - * the string is %NULL terminated. - - * @items_read: location to store number of bytes read, or %NULL. - * If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be - * returned in case @str contains a trailing partial - * character. If an error occurs then the index of the - * invalid input is stored here. - * @items_written: location to store number of words written, or %NULL. - * The value stored here does not include the trailing - * 0 word. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError other than - * %G_CONVERT_ERROR_NO_CONVERSION may occur. - * - * Convert a string from UTF-8 to UTF-16. A 0 word will be - * added to the result after the converted text. - * - * Return value: a pointer to a newly allocated UTF-16 string. - * This value must be freed with g_free(). If an - * error occurs, %NULL will be returned and - * @error set. - **/ -gunichar2 * -g_utf8_to_utf16 (const gchar *str, - glong len, - glong *items_read, - glong *items_written, - GError **error) -{ - gunichar2 *result = NULL; - gint n16; - const gchar *in; - gint i; - - g_return_val_if_fail (str != NULL, NULL); - - in = str; - n16 = 0; - while ((len < 0 || str + len - in > 0) && *in) - { - gunichar wc = g_utf8_get_char_extended (in, str + len - in); - if (wc & 0x80000000) - { - if (wc == (gunichar)-2) - { - if (items_read) - break; - else - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT, - _("Partial character sequence at end of input")); - } - else - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid byte sequence in conversion input")); - - goto err_out; - } - - if (wc < 0xd800) - n16 += 1; - else if (wc < 0xe000) - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid sequence in conversion input")); - - goto err_out; - } - else if (wc < 0x10000) - n16 += 1; - else if (wc < 0x110000) - n16 += 2; - else - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Character out of range for UTF-16")); - - goto err_out; - } - - in = g_utf8_next_char (in); - } - - result = g_new (gunichar2, n16 + 1); - - in = str; - for (i = 0; i < n16;) - { - gunichar wc = g_utf8_get_char (in); - - if (wc < 0x10000) - { - result[i++] = wc; - } - else - { - result[i++] = (wc - 0x10000) / 0x400 + 0xd800; - result[i++] = (wc - 0x10000) % 0x400 + 0xdc00; - } - - in = g_utf8_next_char (in); - } - - result[i] = 0; - - if (items_written) - *items_written = n16; - - err_out: - if (items_read) - *items_read = in - str; - - return result; -} - -/** - * g_ucs4_to_utf16: - * @str: a UCS-4 encoded string - * @len: the maximum length of @str to use. If < 0, then - * the string is terminated with a zero character. - * @items_read: location to store number of bytes read, or %NULL. - * If an error occurs then the index of the invalid input - * is stored here. - * @items_written: location to store number of words written, or %NULL. - * The value stored here does not include the trailing - * 0 word. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError other than - * %G_CONVERT_ERROR_NO_CONVERSION may occur. - * - * Convert a string from UCS-4 to UTF-16. A 0 word will be - * added to the result after the converted text. - * - * Return value: a pointer to a newly allocated UTF-16 string. - * This value must be freed with g_free(). If an - * error occurs, %NULL will be returned and - * @error set. - **/ -gunichar2 * -g_ucs4_to_utf16 (const gunichar *str, - glong len, - glong *items_read, - glong *items_written, - GError **error) -{ - gunichar2 *result = NULL; - gint n16; - gint i, j; - - n16 = 0; - i = 0; - while ((len < 0 || i < len) && str[i]) - { - gunichar wc = str[i]; - - if (wc < 0xd800) - n16 += 1; - else if (wc < 0xe000) - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Invalid sequence in conversion input")); - - goto err_out; - } - else if (wc < 0x10000) - n16 += 1; - else if (wc < 0x110000) - n16 += 2; - else - { - g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - _("Character out of range for UTF-16")); - - goto err_out; - } - - i++; - } - - result = g_new (gunichar2, n16 + 1); - - for (i = 0, j = 0; j < n16; i++) - { - gunichar wc = str[i]; - - if (wc < 0x10000) - { - result[j++] = wc; - } - else - { - result[j++] = (wc - 0x10000) / 0x400 + 0xd800; - result[j++] = (wc - 0x10000) % 0x400 + 0xdc00; - } - } - result[j] = 0; - - if (items_written) - *items_written = n16; - - err_out: - if (items_read) - *items_read = i; - - return result; -} - -/** - * g_utf8_validate: - * @str: a pointer to character data - * @max_len: max bytes to validate, or -1 to go until nul - * @end: return location for end of valid data - * - * Validates UTF-8 encoded text. @str is the text to validate; - * if @str is nul-terminated, then @max_len can be -1, otherwise - * @max_len should be the number of bytes to validate. - * If @end is non-%NULL, then the end of the valid range - * will be stored there (i.e. the address of the first invalid byte - * if some bytes were invalid, or the end of the text being validated - * otherwise). - * - * Returns TRUE if all of @str was valid. Many GLib and GTK+ - * routines <emphasis>require</emphasis> valid UTF8 as input; - * so data read from a file or the network should be checked - * with g_utf8_validate() before doing anything else with it. - * - * Return value: TRUE if the text was valid UTF-8. - **/ -gboolean -g_utf8_validate (const gchar *str, - gssize max_len, - const gchar **end) -{ - - const gchar *p; - - g_return_val_if_fail (str != NULL, FALSE); - - if (end) - *end = str; - - p = str; - - while ((max_len < 0 || (p - str) < max_len) && *p) - { - int i, mask = 0, len; - gunichar result; - unsigned char c = (unsigned char) *p; - - UTF8_COMPUTE (c, mask, len); - - if (len == -1) - break; - - /* check that the expected number of bytes exists in str */ - if (max_len >= 0 && - ((max_len - (p - str)) < len)) - break; - - UTF8_GET (result, p, i, mask, len); - - if (UTF8_LENGTH (result) != len) /* Check for overlong UTF-8 */ - break; - - if (result == (gunichar)-1) - break; - - if (!UNICODE_VALID (result)) - break; - - p += len; - } - - if (end) - *end = p; - - /* See that we covered the entire length if a length was - * passed in, or that we ended on a nul if not - */ - if (max_len >= 0 && - p != (str + max_len)) - return FALSE; - else if (max_len < 0 && - *p != '\0') - return FALSE; - else - return TRUE; -} - -/** - * g_unichar_validate: - * @ch: a Unicode character - * - * Checks whether @ch is a valid Unicode character. Some possible - * integer values of @ch will not be valid. 0 is considered a valid - * character, though it's normally a string terminator. - * - * Return value: %TRUE if @ch is a valid Unicode character - **/ -gboolean -g_unichar_validate (gunichar ch) -{ - return UNICODE_VALID (ch); -} diff --git a/gutils.c b/gutils.c deleted file mode 100644 index e4cc7a6aa..000000000 --- a/gutils.c +++ /dev/null @@ -1,1107 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1998 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe for the unix part, FIXME: make the win32 part MT safe as well. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <stdarg.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <errno.h> -#ifdef HAVE_PWD_H -#include <pwd.h> -#endif -#include <sys/types.h> -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif - -/* implement Glib's inline functions - */ -#define G_IMPLEMENT_INLINES 1 -#define __G_UTILS_C__ -#include "glib.h" - -#ifdef MAXPATHLEN -#define G_PATH_LENGTH MAXPATHLEN -#elif defined (PATH_MAX) -#define G_PATH_LENGTH PATH_MAX -#elif defined (_PC_PATH_MAX) -#define G_PATH_LENGTH sysconf(_PC_PATH_MAX) -#else -#define G_PATH_LENGTH 2048 -#endif - -#ifdef G_PLATFORM_WIN32 -# define STRICT /* Strict typing, please */ -# include <windows.h> -# undef STRICT -# include <ctype.h> -#endif /* G_PLATFORM_WIN32 */ - -#ifdef G_OS_WIN32 -# include <direct.h> -#endif - -#ifdef HAVE_CODESET -#include <langinfo.h> -#endif - -const guint glib_major_version = GLIB_MAJOR_VERSION; -const guint glib_minor_version = GLIB_MINOR_VERSION; -const guint glib_micro_version = GLIB_MICRO_VERSION; -const guint glib_interface_age = GLIB_INTERFACE_AGE; -const guint glib_binary_age = GLIB_BINARY_AGE; - -#if !defined (HAVE_MEMMOVE) && !defined (HAVE_WORKING_BCOPY) -void -g_memmove (gpointer dest, gconstpointer src, gulong len) -{ - gchar* destptr = dest; - const gchar* srcptr = src; - if (src + len < dest || dest + len < src) - { - bcopy (src, dest, len); - return; - } - else if (dest <= src) - { - while (len--) - *(destptr++) = *(srcptr++); - } - else - { - destptr += len; - srcptr += len; - while (len--) - *(--destptr) = *(--srcptr); - } -} -#endif /* !HAVE_MEMMOVE && !HAVE_WORKING_BCOPY */ - -void -g_atexit (GVoidFunc func) -{ - gint result; - const gchar *error = NULL; - - /* keep this in sync with glib.h */ - -#ifdef G_NATIVE_ATEXIT - result = ATEXIT (func); - if (result) - error = g_strerror (errno); -#elif defined (HAVE_ATEXIT) -# ifdef NeXT /* @#%@! NeXTStep */ - result = !atexit ((void (*)(void)) func); - if (result) - error = g_strerror (errno); -# else - result = atexit ((void (*)(void)) func); - if (result) - error = g_strerror (errno); -# endif /* NeXT */ -#elif defined (HAVE_ON_EXIT) - result = on_exit ((void (*)(int, void *)) func, NULL); - if (result) - error = g_strerror (errno); -#else - result = 0; - error = "no implementation"; -#endif /* G_NATIVE_ATEXIT */ - - if (error) - g_error ("Could not register atexit() function: %s", error); -} - -/* Based on execvp() from GNU Libc. - * Some of this code is cut-and-pasted into gspawn.c - */ - -static gchar* -my_strchrnul (const gchar *str, gchar c) -{ - gchar *p = (gchar*)str; - while (*p && (*p != c)) - ++p; - - return p; -} - -#ifdef G_OS_WIN32 - -gchar *inner_find_program_in_path (const gchar *program); - -gchar* -g_find_program_in_path (const gchar *program) -{ - const gchar *last_dot = strrchr (program, '.'); - - if (last_dot == NULL || strchr (last_dot, '\\') != NULL) - { - const gint program_length = strlen (program); - const gchar *pathext = getenv ("PATHEXT"); - const gchar *p; - gchar *decorated_program; - gchar *retval; - - if (pathext == NULL) - pathext = ".com;.exe;.bat"; - - p = pathext; - do - { - pathext = p; - p = my_strchrnul (pathext, ';'); - - decorated_program = g_malloc (program_length + (p-pathext) + 1); - memcpy (decorated_program, program, program_length); - memcpy (decorated_program+program_length, pathext, p-pathext); - decorated_program [program_length + (p-pathext)] = '\0'; - - retval = inner_find_program_in_path (decorated_program); - g_free (decorated_program); - - if (retval != NULL) - return retval; - } while (*p++ != '\0'); - return NULL; - } - else - return inner_find_program_in_path (program); -} - -#define g_find_program_in_path inner_find_program_in_path -#endif - -/** - * g_find_program_in_path: - * @program: a program name - * - * Locates the first executable named @program in the user's path, in the - * same way that execvp() would locate it. Returns an allocated string - * with the absolute path name, or NULL if the program is not found in - * the path. If @program is already an absolute path, returns a copy of - * @program if @program exists and is executable, and NULL otherwise. - * - * On Windows, if @program does not have a file type suffix, tries to - * append the suffixes in the PATHEXT environment variable (if that - * doesn't exists, the suffixes .com, .exe, and .bat) in turn, and - * then look for the resulting file name in the same way as - * CreateProcess() would. This means first in the directory where the - * program was loaded from, then in the current directory, then in the - * Windows 32-bit system directory, then in the Windows directory, and - * finally in the directories in the PATH environment variable. If - * the program is found, the return value contains the full name - * including the type suffix. - * - * Return value: absolute path, or NULL - **/ -gchar* -g_find_program_in_path (const gchar *program) -{ - const gchar *path, *p; - gchar *name, *freeme; -#ifdef G_OS_WIN32 - gchar *path_tmp; -#endif - size_t len; - size_t pathlen; - - g_return_val_if_fail (program != NULL, NULL); - - /* If it is an absolute path, or a relative path including subdirectories, - * don't look in PATH. - */ - if (g_path_is_absolute (program) - || strchr (program, G_DIR_SEPARATOR) != NULL) - { - if (g_file_test (program, G_FILE_TEST_IS_EXECUTABLE)) - return g_strdup (program); - else - return NULL; - } - - path = g_getenv ("PATH"); -#ifdef G_OS_UNIX - if (path == NULL) - { - /* There is no `PATH' in the environment. The default - * search path in GNU libc is the current directory followed by - * the path `confstr' returns for `_CS_PATH'. - */ - - /* In GLib we put . last, for security, and don't use the - * unportable confstr(); UNIX98 does not actually specify - * what to search if PATH is unset. POSIX may, dunno. - */ - - path = "/bin:/usr/bin:."; - } -#else - { - gchar *tmp; - gchar moddir[MAXPATHLEN], sysdir[MAXPATHLEN], windir[MAXPATHLEN]; - - GetModuleFileName (NULL, moddir, sizeof (moddir)); - tmp = g_path_get_dirname (moddir); - GetSystemDirectory (sysdir, sizeof (sysdir)); - GetWindowsDirectory (windir, sizeof (windir)); - path_tmp = g_strconcat (tmp, ";.;", sysdir, ";", windir, - (path != NULL ? ";" : NULL), - (path != NULL ? path : NULL), - NULL); - g_free (tmp); - path = path_tmp; - } -#endif - - len = strlen (program) + 1; - pathlen = strlen (path); - freeme = name = g_malloc (pathlen + len + 1); - - /* Copy the file name at the top, including '\0' */ - memcpy (name + pathlen + 1, program, len); - name = name + pathlen; - /* And add the slash before the filename */ - *name = G_DIR_SEPARATOR; - - p = path; - do - { - char *startp; - - path = p; - p = my_strchrnul (path, G_SEARCHPATH_SEPARATOR); - - if (p == path) - /* Two adjacent colons, or a colon at the beginning or the end - * of `PATH' means to search the current directory. - */ - startp = name + 1; - else - startp = memcpy (name - (p - path), path, p - path); - - if (g_file_test (startp, G_FILE_TEST_IS_EXECUTABLE)) - { - gchar *ret; - ret = g_strdup (startp); - g_free (freeme); -#ifdef G_OS_WIN32 - g_free (path_tmp); -#endif - return ret; - } - } - while (*p++ != '\0'); - - g_free (freeme); -#ifdef G_OS_WIN32 - g_free (path_tmp); -#endif - - return NULL; -} - -gint -g_snprintf (gchar *str, - gulong n, - gchar const *fmt, - ...) -{ -#ifdef HAVE_VSNPRINTF - va_list args; - gint retval; - - g_return_val_if_fail (str != NULL, 0); - g_return_val_if_fail (n > 0, 0); - g_return_val_if_fail (fmt != NULL, 0); - - va_start (args, fmt); - retval = vsnprintf (str, n, fmt, args); - va_end (args); - - if (retval < 0) - { - str[n-1] = '\0'; - retval = strlen (str); - } - - return retval; -#else /* !HAVE_VSNPRINTF */ - gchar *printed; - va_list args; - - g_return_val_if_fail (str != NULL, 0); - g_return_val_if_fail (n > 0, 0); - g_return_val_if_fail (fmt != NULL, 0); - - va_start (args, fmt); - printed = g_strdup_vprintf (fmt, args); - va_end (args); - - strncpy (str, printed, n); - str[n-1] = '\0'; - - g_free (printed); - - return strlen (str); -#endif /* !HAVE_VSNPRINTF */ -} - -gint -g_vsnprintf (gchar *str, - gulong n, - gchar const *fmt, - va_list args) -{ -#ifdef HAVE_VSNPRINTF - gint retval; - - g_return_val_if_fail (str != NULL, 0); - g_return_val_if_fail (n > 0, 0); - g_return_val_if_fail (fmt != NULL, 0); - - retval = vsnprintf (str, n, fmt, args); - - if (retval < 0) - { - str[n-1] = '\0'; - retval = strlen (str); - } - - return retval; -#else /* !HAVE_VSNPRINTF */ - gchar *printed; - - g_return_val_if_fail (str != NULL, 0); - g_return_val_if_fail (n > 0, 0); - g_return_val_if_fail (fmt != NULL, 0); - - printed = g_strdup_vprintf (fmt, args); - strncpy (str, printed, n); - str[n-1] = '\0'; - - g_free (printed); - - return strlen (str); -#endif /* !HAVE_VSNPRINTF */ -} - -guint -g_parse_debug_string (const gchar *string, - const GDebugKey *keys, - guint nkeys) -{ - guint i; - guint result = 0; - - g_return_val_if_fail (string != NULL, 0); - - if (!g_strcasecmp (string, "all")) - { - for (i=0; i<nkeys; i++) - result |= keys[i].value; - } - else - { - const gchar *p = string; - const gchar *q; - gboolean done = FALSE; - - while (*p && !done) - { - q = strchr (p, ':'); - if (!q) - { - q = p + strlen(p); - done = TRUE; - } - - for (i=0; i<nkeys; i++) - if (g_strncasecmp(keys[i].key, p, q - p) == 0 && - keys[i].key[q - p] == '\0') - result |= keys[i].value; - - p = q + 1; - } - } - - return result; -} - -G_CONST_RETURN gchar* -g_basename (const gchar *file_name) -{ - register gchar *base; - - g_return_val_if_fail (file_name != NULL, NULL); - - base = strrchr (file_name, G_DIR_SEPARATOR); - if (base) - return base + 1; - -#ifdef G_OS_WIN32 - if (isalpha (file_name[0]) && file_name[1] == ':') - return (gchar*) file_name + 2; -#endif /* G_OS_WIN32 */ - - return (gchar*) file_name; -} - -gchar* -g_path_get_basename (const gchar *file_name) -{ - register gssize base; - register gssize last_nonslash; - gsize len; - gchar *retval; - - g_return_val_if_fail (file_name != NULL, NULL); - - if (file_name[0] == '\0') - /* empty string */ - return g_strdup ("."); - - last_nonslash = strlen (file_name) - 1; - - while (last_nonslash >= 0 && file_name [last_nonslash] == G_DIR_SEPARATOR) - last_nonslash--; - - if (last_nonslash == -1) - /* string only containing slashes */ - return g_strdup (G_DIR_SEPARATOR_S); - -#ifdef G_OS_WIN32 - if (last_nonslash == 1 && isalpha (file_name[0]) && file_name[1] == ':') - /* string only containing slashes and a drive */ - return g_strdup (G_DIR_SEPARATOR_S); -#endif /* G_OS_WIN32 */ - - base = last_nonslash; - - while (base >=0 && file_name [base] != G_DIR_SEPARATOR) - base--; - -#ifdef G_OS_WIN32 - if (base == -1 && isalpha (file_name[0]) && file_name[1] == ':') - base = 1; -#endif /* G_OS_WIN32 */ - - len = last_nonslash - base; - retval = g_malloc (len + 1); - memcpy (retval, file_name + base + 1, len); - retval [len] = '\0'; - return retval; -} - -gboolean -g_path_is_absolute (const gchar *file_name) -{ - g_return_val_if_fail (file_name != NULL, FALSE); - - if (file_name[0] == G_DIR_SEPARATOR) - return TRUE; - -#ifdef G_OS_WIN32 - /* Recognize drive letter on native Windows */ - if (isalpha (file_name[0]) && file_name[1] == ':' && file_name[2] == G_DIR_SEPARATOR) - return TRUE; -#endif /* G_OS_WIN32 */ - - return FALSE; -} - -G_CONST_RETURN gchar* -g_path_skip_root (const gchar *file_name) -{ - g_return_val_if_fail (file_name != NULL, NULL); - -#ifdef G_PLATFORM_WIN32 - /* Skip \\server\share (Win32) or //server/share (Cygwin) */ - if (file_name[0] == G_DIR_SEPARATOR && - file_name[1] == G_DIR_SEPARATOR && - file_name[2]) - { - gchar *p; - - if ((p = strchr (file_name + 2, G_DIR_SEPARATOR)) > file_name + 2 && - p[1]) - { - file_name = p + 1; - - while (file_name[0] && file_name[0] != G_DIR_SEPARATOR) - file_name++; - - /* Possibly skip a backslash after the share name */ - if (file_name[0] == G_DIR_SEPARATOR) - file_name++; - - return (gchar *)file_name; - } - } -#endif - - /* Skip initial slashes */ - if (file_name[0] == G_DIR_SEPARATOR) - { - while (file_name[0] == G_DIR_SEPARATOR) - file_name++; - return (gchar *)file_name; - } - -#ifdef G_OS_WIN32 - /* Skip X:\ */ - if (isalpha (file_name[0]) && file_name[1] == ':' && file_name[2] == G_DIR_SEPARATOR) - return (gchar *)file_name + 3; -#endif - - return NULL; -} - -gchar* -g_path_get_dirname (const gchar *file_name) -{ - register gchar *base; - register gsize len; - - g_return_val_if_fail (file_name != NULL, NULL); - - base = strrchr (file_name, G_DIR_SEPARATOR); - if (!base) - return g_strdup ("."); - while (base > file_name && *base == G_DIR_SEPARATOR) - base--; - len = (guint) 1 + base - file_name; - - base = g_new (gchar, len + 1); - g_memmove (base, file_name, len); - base[len] = 0; - - return base; -} - -gchar* -g_get_current_dir (void) -{ - gchar *buffer = NULL; - gchar *dir = NULL; - static gulong max_len = 0; - - if (max_len == 0) - max_len = (G_PATH_LENGTH == -1) ? 2048 : G_PATH_LENGTH; - - /* We don't use getcwd(3) on SUNOS, because, it does a popen("pwd") - * and, if that wasn't bad enough, hangs in doing so. - */ -#if (defined (sun) && !defined (__SVR4)) || !defined(HAVE_GETCWD) - buffer = g_new (gchar, max_len + 1); - *buffer = 0; - dir = getwd (buffer); -#else /* !sun || !HAVE_GETCWD */ - while (max_len < G_MAXULONG / 2) - { - buffer = g_new (gchar, max_len + 1); - *buffer = 0; - dir = getcwd (buffer, max_len); - - if (dir || errno != ERANGE) - break; - - g_free (buffer); - max_len *= 2; - } -#endif /* !sun || !HAVE_GETCWD */ - - if (!dir || !*buffer) - { - /* hm, should we g_error() out here? - * this can happen if e.g. "./" has mode \0000 - */ - buffer[0] = G_DIR_SEPARATOR; - buffer[1] = 0; - } - - dir = g_strdup (buffer); - g_free (buffer); - - return dir; -} - -G_CONST_RETURN gchar* -g_getenv (const gchar *variable) -{ -#ifndef G_OS_WIN32 - g_return_val_if_fail (variable != NULL, NULL); - - return getenv (variable); -#else - G_LOCK_DEFINE_STATIC (getenv); - struct env_struct - { - gchar *key; - gchar *value; - } *env; - static GArray *environs = NULL; - gchar *system_env; - guint length, i; - gchar dummy[2]; - - g_return_val_if_fail (variable != NULL, NULL); - - G_LOCK (getenv); - - if (!environs) - environs = g_array_new (FALSE, FALSE, sizeof (struct env_struct)); - - /* First we try to find the envinronment variable inside the already - * found ones. - */ - - for (i = 0; i < environs->len; i++) - { - env = &g_array_index (environs, struct env_struct, i); - if (strcmp (env->key, variable) == 0) - { - g_assert (env->value); - G_UNLOCK (getenv); - return env->value; - } - } - - /* If not found, we ask the system */ - - system_env = getenv (variable); - if (!system_env) - { - G_UNLOCK (getenv); - return NULL; - } - - /* On Windows NT, it is relatively typical that environment variables - * contain references to other environment variables. Handle that by - * calling ExpandEnvironmentStrings. - */ - - g_array_set_size (environs, environs->len + 1); - - env = &g_array_index (environs, struct env_struct, environs->len - 1); - - /* First check how much space we need */ - length = ExpandEnvironmentStrings (system_env, dummy, 2); - - /* Then allocate that much, and actualy do the expansion and insert - * the new found pair into our buffer - */ - - env->value = g_malloc (length); - env->key = g_strdup (variable); - - ExpandEnvironmentStrings (system_env, env->value, length); - - G_UNLOCK (getenv); - return env->value; -#endif -} - - -G_LOCK_DEFINE_STATIC (g_utils_global); - -static gchar *g_tmp_dir = NULL; -static gchar *g_user_name = NULL; -static gchar *g_real_name = NULL; -static gchar *g_home_dir = NULL; - -/* HOLDS: g_utils_global_lock */ -static void -g_get_any_init (void) -{ - if (!g_tmp_dir) - { - g_tmp_dir = g_strdup (g_getenv ("TMPDIR")); - if (!g_tmp_dir) - g_tmp_dir = g_strdup (g_getenv ("TMP")); - if (!g_tmp_dir) - g_tmp_dir = g_strdup (g_getenv ("TEMP")); - -#ifdef P_tmpdir - if (!g_tmp_dir) - { - gsize k; - g_tmp_dir = g_strdup (P_tmpdir); - k = strlen (g_tmp_dir); - if (k > 1 && g_tmp_dir[k - 1] == G_DIR_SEPARATOR) - g_tmp_dir[k - 1] = '\0'; - } -#endif - - if (!g_tmp_dir) - { -#ifndef G_OS_WIN32 - g_tmp_dir = g_strdup ("/tmp"); -#else /* G_OS_WIN32 */ - g_tmp_dir = g_strdup ("C:\\"); -#endif /* G_OS_WIN32 */ - } - - if (!g_home_dir) - g_home_dir = g_strdup (g_getenv ("HOME")); - -#ifdef G_OS_WIN32 - /* In case HOME is Unix-style (it happens), convert it to - * Windows style. - */ - if (g_home_dir) - { - gchar *p; - while ((p = strchr (g_home_dir, '/')) != NULL) - *p = '\\'; - } - - if (!g_home_dir) - { - /* USERPROFILE is probably the closest equivalent to $HOME? */ - if (getenv ("USERPROFILE") != NULL) - g_home_dir = g_strdup (g_getenv ("USERPROFILE")); - } - - if (!g_home_dir) - { - /* At least at some time, HOMEDRIVE and HOMEPATH were used - * to point to the home directory, I think. But on Windows - * 2000 HOMEDRIVE seems to be equal to SYSTEMDRIVE, and - * HOMEPATH is its root "\"? - */ - if (getenv ("HOMEDRIVE") != NULL && getenv ("HOMEPATH") != NULL) - { - gchar *homedrive, *homepath; - - homedrive = g_strdup (g_getenv ("HOMEDRIVE")); - homepath = g_strdup (g_getenv ("HOMEPATH")); - - g_home_dir = g_strconcat (homedrive, homepath, NULL); - g_free (homedrive); - g_free (homepath); - } - } -#endif /* G_OS_WIN32 */ - -#ifdef HAVE_PWD_H - { - struct passwd *pw = NULL; - gpointer buffer = NULL; - -# if defined (HAVE_POSIX_GETPWUID_R) || defined (HAVE_NONPOSIX_GETPWUID_R) - struct passwd pwd; -# ifdef _SC_GETPW_R_SIZE_MAX - /* This reurns the maximum length */ - glong bufsize = sysconf (_SC_GETPW_R_SIZE_MAX); -# else /* _SC_GETPW_R_SIZE_MAX */ - glong bufsize = 64; -# endif /* _SC_GETPW_R_SIZE_MAX */ - gint error; - - do - { - g_free (buffer); - buffer = g_malloc (bufsize); - errno = 0; - -# ifdef HAVE_POSIX_GETPWUID_R - error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw); - error = error < 0 ? errno : error; -# else /* HAVE_NONPOSIX_GETPWUID_R */ -# ifdef _AIX - error = getpwuid_r (getuid (), &pwd, buffer, bufsize); - pw = error == 0 ? &pwd : NULL; -# else /* !_AIX */ - pw = getpwuid_r (getuid (), &pwd, buffer, bufsize); - error = pw ? 0 : errno; -# endif /* !_AIX */ -# endif /* HAVE_NONPOSIX_GETPWUID_R */ - - if (!pw) - { - /* we bail out prematurely if the user id can't be found - * (should be pretty rare case actually), or if the buffer - * should be sufficiently big and lookups are still not - * successfull. - */ - if (error == 0 || error == ENOENT) - { - g_warning ("getpwuid_r(): failed due to unknown user id (%lu)", - (gulong) getuid ()); - break; - } - if (bufsize > 32 * 1024) - { - g_warning ("getpwuid_r(): failed due to: %s.", - g_strerror (error)); - break; - } - - bufsize *= 2; - } - } - while (!pw); -# endif /* HAVE_POSIX_GETPWUID_R || HAVE_NONPOSIX_GETPWUID_R */ - - if (!pw) - { - setpwent (); - pw = getpwuid (getuid ()); - endpwent (); - } - if (pw) - { - g_user_name = g_strdup (pw->pw_name); - g_real_name = g_strdup (pw->pw_gecos); - if (!g_home_dir) - g_home_dir = g_strdup (pw->pw_dir); - } - g_free (buffer); - } - -#else /* !HAVE_PWD_H */ - -# ifdef G_OS_WIN32 - { - guint len = 17; - gchar buffer[17]; - - if (GetUserName ((LPTSTR) buffer, (LPDWORD) &len)) - { - g_user_name = g_strdup (buffer); - g_real_name = g_strdup (buffer); - } - } -# endif /* G_OS_WIN32 */ - -#endif /* !HAVE_PWD_H */ - -#ifdef __EMX__ - /* change '\\' in %HOME% to '/' */ - g_strdelimit (g_home_dir, "\\",'/'); -#endif - if (!g_user_name) - g_user_name = g_strdup ("somebody"); - if (!g_real_name) - g_real_name = g_strdup ("Unknown"); - else - { - gchar *p; - - for (p = g_real_name; *p; p++) - if (*p == ',') - { - *p = 0; - p = g_strdup (g_real_name); - g_free (g_real_name); - g_real_name = p; - break; - } - } - } -} - -G_CONST_RETURN gchar* -g_get_user_name (void) -{ - G_LOCK (g_utils_global); - if (!g_tmp_dir) - g_get_any_init (); - G_UNLOCK (g_utils_global); - - return g_user_name; -} - -G_CONST_RETURN gchar* -g_get_real_name (void) -{ - G_LOCK (g_utils_global); - if (!g_tmp_dir) - g_get_any_init (); - G_UNLOCK (g_utils_global); - - return g_real_name; -} - -/* Return the home directory of the user. If there is a HOME - * environment variable, its value is returned, otherwise use some - * system-dependent way of finding it out. If no home directory can be - * deduced, return NULL. - */ - -G_CONST_RETURN gchar* -g_get_home_dir (void) -{ - G_LOCK (g_utils_global); - if (!g_tmp_dir) - g_get_any_init (); - G_UNLOCK (g_utils_global); - - return g_home_dir; -} - -/* Return a directory to be used to store temporary files. This is the - * value of the TMPDIR, TMP or TEMP environment variables (they are - * checked in that order). If none of those exist, use P_tmpdir from - * stdio.h. If that isn't defined, return "/tmp" on POSIXly systems, - * and C:\ on Windows. - */ - -G_CONST_RETURN gchar* -g_get_tmp_dir (void) -{ - G_LOCK (g_utils_global); - if (!g_tmp_dir) - g_get_any_init (); - G_UNLOCK (g_utils_global); - - return g_tmp_dir; -} - -static gchar *g_prgname = NULL; - -gchar* -g_get_prgname (void) -{ - gchar* retval; - - G_LOCK (g_utils_global); - retval = g_prgname; - G_UNLOCK (g_utils_global); - - return retval; -} - -void -g_set_prgname (const gchar *prgname) -{ - gchar *c; - - G_LOCK (g_utils_global); - c = g_prgname; - g_prgname = g_strdup (prgname); - g_free (c); - G_UNLOCK (g_utils_global); -} - -guint -g_direct_hash (gconstpointer v) -{ - return GPOINTER_TO_UINT (v); -} - -gboolean -g_direct_equal (gconstpointer v1, - gconstpointer v2) -{ - return v1 == v2; -} - -gboolean -g_int_equal (gconstpointer v1, - gconstpointer v2) -{ - return *((const gint*) v1) == *((const gint*) v2); -} - -guint -g_int_hash (gconstpointer v) -{ - return *(const gint*) v; -} - -/** - * g_get_codeset: - * - * Get the codeset for the current locale. - * - * Return value: a newly allocated string containing the name - * of the codeset. This string must be freed with g_free(). - **/ -gchar * -g_get_codeset (void) -{ -#ifdef HAVE_CODESET - char *result = nl_langinfo (CODESET); - return g_strdup (result); -#else -#ifdef G_PLATFORM_WIN32 - return g_strdup_printf ("CP%d", GetACP ()); -#else - /* FIXME: Do something more intelligent based on setlocale (LC_CTYPE, NULL) - */ - return g_strdup ("ISO-8859-1"); -#endif -#endif -} - -#ifdef ENABLE_NLS - -#include <libintl.h> - - -#ifndef GLIB_LOCALE_DIR -#ifdef G_PLATFORM_WIN32 - -#define GLIB_LOCALE_DIR \ - g_win32_get_package_installation_subdirectory \ - (GETTEXT_PACKAGE, g_strdup_printf ("glib-%d.%d.dll", \ - GLIB_MAJOR_VERSION, \ - GLIB_MINOR_VERSION), \ - "locale") - -#endif /* G_PLATFORM_WIN32 */ -#endif /* !GLIB_LOCALE_DIR */ - -G_CONST_RETURN gchar * -_glib_gettext (const gchar *str) -{ - static gboolean _glib_gettext_initialized = FALSE; - - if (!_glib_gettext_initialized) - { - bindtextdomain(GETTEXT_PACKAGE, GLIB_LOCALE_DIR); - _glib_gettext_initialized = TRUE; - } - - return dgettext (GETTEXT_PACKAGE, str); -} - -#endif /* ENABLE_NLS */ - - diff --git a/gutils.h b/gutils.h deleted file mode 100644 index 3e3d30fe4..000000000 --- a/gutils.h +++ /dev/null @@ -1,332 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_UTILS_H__ -#define __G_UTILS_H__ - -#include <gtypes.h> -#include <stdarg.h> - -G_BEGIN_DECLS - -#ifdef G_OS_WIN32 - -/* On native Win32, directory separator is the backslash, and search path - * separator is the semicolon. - */ -#define G_DIR_SEPARATOR '\\' -#define G_DIR_SEPARATOR_S "\\" -#define G_SEARCHPATH_SEPARATOR ';' -#define G_SEARCHPATH_SEPARATOR_S ";" - -#else /* !G_OS_WIN32 */ - -/* Unix */ - -#define G_DIR_SEPARATOR '/' -#define G_DIR_SEPARATOR_S "/" -#define G_SEARCHPATH_SEPARATOR ':' -#define G_SEARCHPATH_SEPARATOR_S ":" - -#endif /* !G_OS_WIN32 */ - -/* Define G_VA_COPY() to do the right thing for copying va_list variables. - * glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy. - */ -#if !defined (G_VA_COPY) -# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) -# define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) -# elif defined (G_VA_COPY_AS_ARRAY) -# define G_VA_COPY(ap1, ap2) g_memmove ((ap1), (ap2), sizeof (va_list)) -# else /* va_list is a pointer */ -# define G_VA_COPY(ap1, ap2) ((ap1) = (ap2)) -# endif /* va_list is a pointer */ -#endif /* !G_VA_COPY */ - -/* inlining hassle. for compilers that don't allow the `inline' keyword, - * mostly because of strict ANSI C compliance or dumbness, we try to fall - * back to either `__inline__' or `__inline'. - * we define G_CAN_INLINE, if the compiler seems to be actually - * *capable* to do function inlining, in which case inline function bodys - * do make sense. we also define G_INLINE_FUNC to properly export the - * function prototypes if no inlining can be performed. - * inline function bodies have to be special cased with G_CAN_INLINE and a - * .c file specific macro to allow one compiled instance with extern linkage - * of the functions by defining G_IMPLEMENT_INLINES and the .c file macro. - */ -#ifdef G_IMPLEMENT_INLINES -# define G_INLINE_FUNC extern -# undef G_CAN_INLINE -#endif -#ifndef G_INLINE_FUNC -# define G_CAN_INLINE 1 -#endif -#if defined (G_HAVE_INLINE) && defined (__GNUC__) && defined (__STRICT_ANSI__) -# undef inline -# define inline __inline__ -#elif !defined (G_HAVE_INLINE) -# undef inline -# if defined (G_HAVE___INLINE__) -# define inline __inline__ -# elif defined (G_HAVE___INLINE) -# define inline __inline -# else /* !inline && !__inline__ && !__inline */ -# define inline /* don't inline, then */ -# ifndef G_INLINE_FUNC -# undef G_CAN_INLINE -# endif -# endif -#endif -#ifndef G_INLINE_FUNC -# if defined (__GNUC__) && (__OPTIMIZE__) -# define G_INLINE_FUNC extern inline -# elif defined (G_CAN_INLINE) && !defined (__GNUC__) -# define G_INLINE_FUNC static inline -# else /* can't inline */ -# define G_INLINE_FUNC extern -# undef G_CAN_INLINE -# endif -#endif /* !G_INLINE_FUNC */ - -/* Retrive static string info - */ -G_CONST_RETURN gchar* g_get_user_name (void); -G_CONST_RETURN gchar* g_get_real_name (void); -G_CONST_RETURN gchar* g_get_home_dir (void); -G_CONST_RETURN gchar* g_get_tmp_dir (void); -gchar* g_get_prgname (void); -void g_set_prgname (const gchar *prgname); - - -typedef struct _GDebugKey GDebugKey; -struct _GDebugKey -{ - gchar *key; - guint value; -}; - -/* Miscellaneous utility functions - */ -guint g_parse_debug_string (const gchar *string, - const GDebugKey *keys, - guint nkeys); - -gint g_snprintf (gchar *string, - gulong n, - gchar const *format, - ...) G_GNUC_PRINTF (3, 4); -gint g_vsnprintf (gchar *string, - gulong n, - gchar const *format, - va_list args); - -/* Check if a file name is an absolute path */ -gboolean g_path_is_absolute (const gchar *file_name); - -/* In case of absolute paths, skip the root part */ -G_CONST_RETURN gchar* g_path_skip_root (const gchar *file_name); - -#ifndef G_DISABLE_DEPRECATED - -/* These two functions are deprecated and will be removed in the next - * major release of GLib. Use g_path_get_dirname/g_path_get_basename - * instead. Whatch out! The string returned by g_path_get_basename - * must be g_freed, while the string returned by g_basename must not.*/ -G_CONST_RETURN gchar* g_basename (const gchar *file_name); -#define g_dirname g_path_get_dirname - -#endif /* G_DISABLE_DEPRECATED */ - -/* The returned strings are newly allocated with g_malloc() */ -gchar* g_get_current_dir (void); -gchar* g_path_get_basename (const gchar *file_name); -gchar* g_path_get_dirname (const gchar *file_name); - -/* Get the codeset for the current locale */ -/* gchar * g_get_codeset (void); */ - -/* return the environment string for the variable. The returned memory - * must not be freed. */ -G_CONST_RETURN gchar* g_getenv (const gchar *variable); - - -/* we try to provide a usefull equivalent for ATEXIT if it is - * not defined, but use is actually abandoned. people should - * use g_atexit() instead. - */ -typedef void (*GVoidFunc) (void); -#ifndef ATEXIT -# define ATEXIT(proc) g_ATEXIT(proc) -#else -# define G_NATIVE_ATEXIT -#endif /* ATEXIT */ -/* we use a GLib function as a replacement for ATEXIT, so - * the programmer is not required to check the return value - * (if there is any in the implementation) and doesn't encounter - * missing include files. - */ -void g_atexit (GVoidFunc func); - -/* Look for an executable in PATH, following execvp() rules */ -gchar* g_find_program_in_path (const gchar *program); - -/* Bit tests - */ -G_INLINE_FUNC gint g_bit_nth_lsf (guint32 mask, - gint nth_bit); -G_INLINE_FUNC gint g_bit_nth_msf (guint32 mask, - gint nth_bit); -G_INLINE_FUNC guint g_bit_storage (guint number); - -/* Trash Stacks - * elements need to be >= sizeof (gpointer) - */ -typedef struct _GTrashStack GTrashStack; -struct _GTrashStack -{ - GTrashStack *next; -}; - -G_INLINE_FUNC void g_trash_stack_push (GTrashStack **stack_p, - gpointer data_p); -G_INLINE_FUNC gpointer g_trash_stack_pop (GTrashStack **stack_p); -G_INLINE_FUNC gpointer g_trash_stack_peek (GTrashStack **stack_p); -G_INLINE_FUNC guint g_trash_stack_height (GTrashStack **stack_p); - -/* inline function implementations - */ -#if defined (G_CAN_INLINE) || defined (__G_UTILS_C__) -G_INLINE_FUNC gint -g_bit_nth_lsf (guint32 mask, - gint nth_bit) -{ - do - { - nth_bit++; - if (mask & (1 << (guint) nth_bit)) - return nth_bit; - } - while (nth_bit < 32); - return -1; -} -G_INLINE_FUNC gint -g_bit_nth_msf (guint32 mask, - gint nth_bit) -{ - if (nth_bit < 0) - nth_bit = 32; - do - { - nth_bit--; - if (mask & (1 << (guint) nth_bit)) - return nth_bit; - } - while (nth_bit > 0); - return -1; -} -G_INLINE_FUNC guint -g_bit_storage (guint number) -{ - register guint n_bits = 0; - - do - { - n_bits++; - number >>= 1; - } - while (number); - return n_bits; -} -G_INLINE_FUNC void -g_trash_stack_push (GTrashStack **stack_p, - gpointer data_p) -{ - GTrashStack *data = (GTrashStack *) data_p; - - data->next = *stack_p; - *stack_p = data; -} -G_INLINE_FUNC gpointer -g_trash_stack_pop (GTrashStack **stack_p) -{ - GTrashStack *data; - - data = *stack_p; - if (data) - { - *stack_p = data->next; - /* NULLify private pointer here, most platforms store NULL as - * subsequent 0 bytes - */ - data->next = NULL; - } - - return data; -} -G_INLINE_FUNC gpointer -g_trash_stack_peek (GTrashStack **stack_p) -{ - GTrashStack *data; - - data = *stack_p; - - return data; -} -G_INLINE_FUNC guint -g_trash_stack_height (GTrashStack **stack_p) -{ - GTrashStack *data; - guint i = 0; - - for (data = *stack_p; data; data = data->next) - i++; - - return i; -} -#endif /* G_CAN_INLINE || __G_UTILS_C__ */ - -/* Glib version. - * we prefix variable declarations so they can - * properly get exported in windows dlls. - */ -GLIB_VAR const guint glib_major_version; -GLIB_VAR const guint glib_minor_version; -GLIB_VAR const guint glib_micro_version; -GLIB_VAR const guint glib_interface_age; -GLIB_VAR const guint glib_binary_age; - -#define GLIB_CHECK_VERSION(major,minor,micro) \ - (GLIB_MAJOR_VERSION > (major) || \ - (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \ - (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \ - GLIB_MICRO_VERSION >= (micro))) - -G_END_DECLS - -#endif /* __G_UTILS_H__ */ - - - diff --git a/gwin32.c b/gwin32.c deleted file mode 100644 index 594fbbe9a..000000000 --- a/gwin32.c +++ /dev/null @@ -1,1032 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1998 Peter Mattis, Spencer Kimball and Josh MacDonald - * Copyright (C) 1998-1999 Tor Lillqvist - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -/* - * MT safe for the unix part, FIXME: make the win32 part MT safe as well. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "glibconfig.h" - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <errno.h> - -#define STRICT /* Strict typing, please */ -#include <windows.h> -#undef STRICT -#ifndef G_WITH_CYGWIN -#include <direct.h> -#endif -#include <errno.h> -#include <ctype.h> -#ifdef _MSC_VER -# include <io.h> -#endif /* _MSC_VER */ - -#include "glib.h" - -#ifdef G_WITH_CYGWIN -#include <sys/cygwin.h> -#endif - -#ifndef G_WITH_CYGWIN - -gint -g_win32_ftruncate (gint fd, - guint size) -{ - HANDLE hfile; - guint curpos; - - g_return_val_if_fail (fd >= 0, -1); - - hfile = (HANDLE) _get_osfhandle (fd); - curpos = SetFilePointer (hfile, 0, NULL, FILE_CURRENT); - if (curpos == 0xFFFFFFFF - || SetFilePointer (hfile, size, NULL, FILE_BEGIN) == 0xFFFFFFFF - || !SetEndOfFile (hfile)) - { - gint error = GetLastError (); - - switch (error) - { - case ERROR_INVALID_HANDLE: - errno = EBADF; - break; - default: - errno = EIO; - break; - } - - return -1; - } - - return 0; -} - -DIR* -g_win32_opendir (const char *dirname) -{ - DIR *result; - gchar *mask; - guint k; - - g_return_val_if_fail (dirname != NULL, NULL); - - result = g_new0 (DIR, 1); - result->find_file_data = g_new0 (WIN32_FIND_DATA, 1); - result->dir_name = g_strdup (dirname); - - k = strlen (result->dir_name); - if (k && result->dir_name[k - 1] == '\\') - { - result->dir_name[k - 1] = '\0'; - } - mask = g_strdup_printf ("%s\\*", result->dir_name); - - result->find_file_handle = (guint) FindFirstFile (mask, - (LPWIN32_FIND_DATA) result->find_file_data); - g_free (mask); - - if (result->find_file_handle == (guint) INVALID_HANDLE_VALUE) - { - int error = GetLastError (); - - g_free (result->dir_name); - g_free (result->find_file_data); - g_free (result); - switch (error) - { - default: - errno = EIO; - return NULL; - } - } - result->just_opened = TRUE; - - return result; -} - -struct dirent* -g_win32_readdir (DIR *dir) -{ - gchar *basename; - - g_return_val_if_fail (dir != NULL, NULL); - - if (dir->just_opened) - dir->just_opened = FALSE; - else - { - if (!FindNextFile ((HANDLE) dir->find_file_handle, - (LPWIN32_FIND_DATA) dir->find_file_data)) - { - int error = GetLastError (); - - switch (error) - { - case ERROR_NO_MORE_FILES: - return NULL; - default: - errno = EIO; - return NULL; - } - } - } - - basename = g_path_get_basename (((LPWIN32_FIND_DATA) dir->find_file_data)->cFileName); - - strcpy (dir->readdir_result.d_name, basename); - - g_free (basename); - - return &dir->readdir_result; -} - -void -g_win32_rewinddir (DIR *dir) -{ - gchar *mask; - - g_return_if_fail (dir != NULL); - - if (!FindClose ((HANDLE) dir->find_file_handle)) - g_warning ("gwin_rewinddir(): FindClose() failed\n"); - - mask = g_strdup_printf ("%s\\*", dir->dir_name); - dir->find_file_handle = (guint) FindFirstFile (mask, - (LPWIN32_FIND_DATA) dir->find_file_data); - g_free (mask); - - if (dir->find_file_handle == (guint) INVALID_HANDLE_VALUE) - { - int error = GetLastError (); - - switch (error) - { - default: - errno = EIO; - return; - } - } - dir->just_opened = TRUE; -} - -gint -g_win32_closedir (DIR *dir) -{ - g_return_val_if_fail (dir != NULL, -1); - - if (!FindClose ((HANDLE) dir->find_file_handle)) - { - int error = GetLastError (); - - switch (error) - { - default: - errno = EIO; return -1; - } - } - - g_free (dir->dir_name); - g_free (dir->find_file_data); - g_free (dir); - - return 0; -} -#endif - -/* Mingw headers don't have latest language and sublanguage codes */ -#ifndef LANG_AFRIKAANS -#define LANG_AFRIKAANS 0x36 -#endif -#ifndef LANG_ALBANIAN -#define LANG_ALBANIAN 0x1c -#endif -#ifndef LANG_ARABIC -#define LANG_ARABIC 0x01 -#endif -#ifndef LANG_ARMENIAN -#define LANG_ARMENIAN 0x2b -#endif -#ifndef LANG_ASSAMESE -#define LANG_ASSAMESE 0x4d -#endif -#ifndef LANG_AZERI -#define LANG_AZERI 0x2c -#endif -#ifndef LANG_BASQUE -#define LANG_BASQUE 0x2d -#endif -#ifndef LANG_BELARUSIAN -#define LANG_BELARUSIAN 0x23 -#endif -#ifndef LANG_BENGALI -#define LANG_BENGALI 0x45 -#endif -#ifndef LANG_CATALAN -#define LANG_CATALAN 0x03 -#endif -#ifndef LANG_ESTONIAN -#define LANG_ESTONIAN 0x25 -#endif -#ifndef LANG_FAEROESE -#define LANG_FAEROESE 0x38 -#endif -#ifndef LANG_FARSI -#define LANG_FARSI 0x29 -#endif -#ifndef LANG_GEORGIAN -#define LANG_GEORGIAN 0x37 -#endif -#ifndef LANG_GUJARATI -#define LANG_GUJARATI 0x47 -#endif -#ifndef LANG_HEBREW -#define LANG_HEBREW 0x0d -#endif -#ifndef LANG_HINDI -#define LANG_HINDI 0x39 -#endif -#ifndef LANG_INDONESIAN -#define LANG_INDONESIAN 0x21 -#endif -#ifndef LANG_KANNADA -#define LANG_KANNADA 0x4b -#endif -#ifndef LANG_KASHMIRI -#define LANG_KASHMIRI 0x60 -#endif -#ifndef LANG_KAZAK -#define LANG_KAZAK 0x3f -#endif -#ifndef LANG_KONKANI -#define LANG_KONKANI 0x57 -#endif -#ifndef LANG_LATVIAN -#define LANG_LATVIAN 0x26 -#endif -#ifndef LANG_LITHUANIAN -#define LANG_LITHUANIAN 0x27 -#endif -#ifndef LANG_MACEDONIAN -#define LANG_MACEDONIAN 0x2f -#endif -#ifndef LANG_MALAY -#define LANG_MALAY 0x3e -#endif -#ifndef LANG_MALAYALAM -#define LANG_MALAYALAM 0x4c -#endif -#ifndef LANG_MANIPURI -#define LANG_MANIPURI 0x58 -#endif -#ifndef LANG_MARATHI -#define LANG_MARATHI 0x4e -#endif -#ifndef LANG_NEPALI -#define LANG_NEPALI 0x61 -#endif -#ifndef LANG_ORIYA -#define LANG_ORIYA 0x48 -#endif -#ifndef LANG_PUNJABI -#define LANG_PUNJABI 0x46 -#endif -#ifndef LANG_SANSKRIT -#define LANG_SANSKRIT 0x4f -#endif -#ifndef LANG_SERBIAN -#define LANG_SERBIAN 0x1a -#endif -#ifndef LANG_SINDHI -#define LANG_SINDHI 0x59 -#endif -#ifndef LANG_SLOVAK -#define LANG_SLOVAK 0x1b -#endif -#ifndef LANG_SWAHILI -#define LANG_SWAHILI 0x41 -#endif -#ifndef LANG_TAMIL -#define LANG_TAMIL 0x49 -#endif -#ifndef LANG_TATAR -#define LANG_TATAR 0x44 -#endif -#ifndef LANG_TELUGU -#define LANG_TELUGU 0x4a -#endif -#ifndef LANG_THAI -#define LANG_THAI 0x1e -#endif -#ifndef LANG_UKRAINIAN -#define LANG_UKRAINIAN 0x22 -#endif -#ifndef LANG_URDU -#define LANG_URDU 0x20 -#endif -#ifndef LANG_UZBEK -#define LANG_UZBEK 0x43 -#endif -#ifndef LANG_VIETNAMESE -#define LANG_VIETNAMESE 0x2a -#endif -#ifndef SUBLANG_ARABIC_SAUDI_ARABIA -#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 -#endif -#ifndef SUBLANG_ARABIC_IRAQ -#define SUBLANG_ARABIC_IRAQ 0x02 -#endif -#ifndef SUBLANG_ARABIC_EGYPT -#define SUBLANG_ARABIC_EGYPT 0x03 -#endif -#ifndef SUBLANG_ARABIC_LIBYA -#define SUBLANG_ARABIC_LIBYA 0x04 -#endif -#ifndef SUBLANG_ARABIC_ALGERIA -#define SUBLANG_ARABIC_ALGERIA 0x05 -#endif -#ifndef SUBLANG_ARABIC_MOROCCO -#define SUBLANG_ARABIC_MOROCCO 0x06 -#endif -#ifndef SUBLANG_ARABIC_TUNISIA -#define SUBLANG_ARABIC_TUNISIA 0x07 -#endif -#ifndef SUBLANG_ARABIC_OMAN -#define SUBLANG_ARABIC_OMAN 0x08 -#endif -#ifndef SUBLANG_ARABIC_YEMEN -#define SUBLANG_ARABIC_YEMEN 0x09 -#endif -#ifndef SUBLANG_ARABIC_SYRIA -#define SUBLANG_ARABIC_SYRIA 0x0a -#endif -#ifndef SUBLANG_ARABIC_JORDAN -#define SUBLANG_ARABIC_JORDAN 0x0b -#endif -#ifndef SUBLANG_ARABIC_LEBANON -#define SUBLANG_ARABIC_LEBANON 0x0c -#endif -#ifndef SUBLANG_ARABIC_KUWAIT -#define SUBLANG_ARABIC_KUWAIT 0x0d -#endif -#ifndef SUBLANG_ARABIC_UAE -#define SUBLANG_ARABIC_UAE 0x0e -#endif -#ifndef SUBLANG_ARABIC_BAHRAIN -#define SUBLANG_ARABIC_BAHRAIN 0x0f -#endif -#ifndef SUBLANG_ARABIC_QATAR -#define SUBLANG_ARABIC_QATAR 0x10 -#endif -#ifndef SUBLANG_AZERI_LATIN -#define SUBLANG_AZERI_LATIN 0x01 -#endif -#ifndef SUBLANG_AZERI_CYRILLIC -#define SUBLANG_AZERI_CYRILLIC 0x02 -#endif -#ifndef SUBLANG_CHINESE_MACAU -#define SUBLANG_CHINESE_MACAU 0x05 -#endif -#ifndef SUBLANG_ENGLISH_SOUTH_AFRICA -#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 -#endif -#ifndef SUBLANG_ENGLISH_JAMAICA -#define SUBLANG_ENGLISH_JAMAICA 0x08 -#endif -#ifndef SUBLANG_ENGLISH_CARIBBEAN -#define SUBLANG_ENGLISH_CARIBBEAN 0x09 -#endif -#ifndef SUBLANG_ENGLISH_BELIZE -#define SUBLANG_ENGLISH_BELIZE 0x0a -#endif -#ifndef SUBLANG_ENGLISH_TRINIDAD -#define SUBLANG_ENGLISH_TRINIDAD 0x0b -#endif -#ifndef SUBLANG_ENGLISH_ZIMBABWE -#define SUBLANG_ENGLISH_ZIMBABWE 0x0c -#endif -#ifndef SUBLANG_ENGLISH_PHILIPPINES -#define SUBLANG_ENGLISH_PHILIPPINES 0x0d -#endif -#ifndef SUBLANG_FRENCH_LUXEMBOURG -#define SUBLANG_FRENCH_LUXEMBOURG 0x05 -#endif -#ifndef SUBLANG_FRENCH_MONACO -#define SUBLANG_FRENCH_MONACO 0x06 -#endif -#ifndef SUBLANG_GERMAN_LUXEMBOURG -#define SUBLANG_GERMAN_LUXEMBOURG 0x04 -#endif -#ifndef SUBLANG_GERMAN_LIECHTENSTEIN -#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 -#endif -#ifndef SUBLANG_KASHMIRI_INDIA -#define SUBLANG_KASHMIRI_INDIA 0x02 -#endif -#ifndef SUBLANG_MALAY_MALAYSIA -#define SUBLANG_MALAY_MALAYSIA 0x01 -#endif -#ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM -#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 -#endif -#ifndef SUBLANG_NEPALI_INDIA -#define SUBLANG_NEPALI_INDIA 0x02 -#endif -#ifndef SUBLANG_SERBIAN_LATIN -#define SUBLANG_SERBIAN_LATIN 0x02 -#endif -#ifndef SUBLANG_SERBIAN_CYRILLIC -#define SUBLANG_SERBIAN_CYRILLIC 0x03 -#endif -#ifndef SUBLANG_SPANISH_GUATEMALA -#define SUBLANG_SPANISH_GUATEMALA 0x04 -#endif -#ifndef SUBLANG_SPANISH_COSTA_RICA -#define SUBLANG_SPANISH_COSTA_RICA 0x05 -#endif -#ifndef SUBLANG_SPANISH_PANAMA -#define SUBLANG_SPANISH_PANAMA 0x06 -#endif -#ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC -#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 -#endif -#ifndef SUBLANG_SPANISH_VENEZUELA -#define SUBLANG_SPANISH_VENEZUELA 0x08 -#endif -#ifndef SUBLANG_SPANISH_COLOMBIA -#define SUBLANG_SPANISH_COLOMBIA 0x09 -#endif -#ifndef SUBLANG_SPANISH_PERU -#define SUBLANG_SPANISH_PERU 0x0a -#endif -#ifndef SUBLANG_SPANISH_ARGENTINA -#define SUBLANG_SPANISH_ARGENTINA 0x0b -#endif -#ifndef SUBLANG_SPANISH_ECUADOR -#define SUBLANG_SPANISH_ECUADOR 0x0c -#endif -#ifndef SUBLANG_SPANISH_CHILE -#define SUBLANG_SPANISH_CHILE 0x0d -#endif -#ifndef SUBLANG_SPANISH_URUGUAY -#define SUBLANG_SPANISH_URUGUAY 0x0e -#endif -#ifndef SUBLANG_SPANISH_PARAGUAY -#define SUBLANG_SPANISH_PARAGUAY 0x0f -#endif -#ifndef SUBLANG_SPANISH_BOLIVIA -#define SUBLANG_SPANISH_BOLIVIA 0x10 -#endif -#ifndef SUBLANG_SPANISH_EL_SALVADOR -#define SUBLANG_SPANISH_EL_SALVADOR 0x11 -#endif -#ifndef SUBLANG_SPANISH_HONDURAS -#define SUBLANG_SPANISH_HONDURAS 0x12 -#endif -#ifndef SUBLANG_SPANISH_NICARAGUA -#define SUBLANG_SPANISH_NICARAGUA 0x13 -#endif -#ifndef SUBLANG_SPANISH_PUERTO_RICO -#define SUBLANG_SPANISH_PUERTO_RICO 0x14 -#endif -#ifndef SUBLANG_SWEDISH_FINLAND -#define SUBLANG_SWEDISH_FINLAND 0x02 -#endif -#ifndef SUBLANG_URDU_PAKISTAN -#define SUBLANG_URDU_PAKISTAN 0x01 -#endif -#ifndef SUBLANG_URDU_INDIA -#define SUBLANG_URDU_INDIA 0x02 -#endif -#ifndef SUBLANG_UZBEK_LATIN -#define SUBLANG_UZBEK_LATIN 0x01 -#endif -#ifndef SUBLANG_UZBEK_CYRILLIC -#define SUBLANG_UZBEK_CYRILLIC 0x02 -#endif - -/** - * g_win32_getlocale: - * - * The setlocale in the Microsoft C library uses locale names of the - * form "English_United States.1252" etc. We want the Unixish standard - * form "en", "zh_TW" etc. This function gets the current thread - * locale from Windows and returns it as a string of the above form - * for use in forming file names etc. The returned string should be - * deallocated with g_free(). - * - * Returns: allocated locale name - */ - -gchar * -g_win32_getlocale (void) -{ - LCID lcid; - gchar *ev; - gint primary, sub; - gchar *l = NULL, *sl = NULL; - gchar bfr[20]; - - if ((ev = getenv ("LC_ALL")) != NULL - || (ev = getenv ("LC_CTYPE")) != NULL - || (ev = getenv ("LANG")) != NULL) - return g_strdup (ev); - - lcid = GetThreadLocale (); - primary = PRIMARYLANGID (LANGIDFROMLCID (lcid)); - sub = SUBLANGID (LANGIDFROMLCID (lcid)); - switch (primary) - { - case LANG_AFRIKAANS: l = "af"; break; - case LANG_ALBANIAN: l = "sq"; break; - case LANG_ARABIC: - l = "ar"; - switch (sub) - { - case SUBLANG_ARABIC_SAUDI_ARABIA: sl = "SA"; break; - case SUBLANG_ARABIC_IRAQ: sl = "IQ"; break; - case SUBLANG_ARABIC_EGYPT: sl = "EG"; break; - case SUBLANG_ARABIC_LIBYA: sl = "LY"; break; - case SUBLANG_ARABIC_ALGERIA: sl = "DZ"; break; - case SUBLANG_ARABIC_MOROCCO: sl = "MA"; break; - case SUBLANG_ARABIC_TUNISIA: sl = "TN"; break; - case SUBLANG_ARABIC_OMAN: sl = "OM"; break; - case SUBLANG_ARABIC_YEMEN: sl = "YE"; break; - case SUBLANG_ARABIC_SYRIA: sl = "SY"; break; - case SUBLANG_ARABIC_JORDAN: sl = "JO"; break; - case SUBLANG_ARABIC_LEBANON: sl = "LB"; break; - case SUBLANG_ARABIC_KUWAIT: sl = "KW"; break; - case SUBLANG_ARABIC_UAE: sl = "AE"; break; - case SUBLANG_ARABIC_BAHRAIN: sl = "BH"; break; - case SUBLANG_ARABIC_QATAR: sl = "QA"; break; - } - break; - case LANG_ARMENIAN: l = "hy"; break; - case LANG_ASSAMESE: l = "as"; break; - case LANG_AZERI: l = "az"; break; - case LANG_BASQUE: l = "eu"; break; - case LANG_BELARUSIAN: l = "be"; break; - case LANG_BENGALI: l = "bn"; break; - case LANG_BULGARIAN: l = "bg"; break; - case LANG_CATALAN: l = "ca"; break; - case LANG_CHINESE: - l = "zh"; - switch (sub) - { - case SUBLANG_CHINESE_TRADITIONAL: sl = "TW"; break; - case SUBLANG_CHINESE_SIMPLIFIED: sl = "CH"; break; - case SUBLANG_CHINESE_HONGKONG: sl = "HK"; break; - case SUBLANG_CHINESE_SINGAPORE: sl = "SG"; break; - case SUBLANG_CHINESE_MACAU: sl = "MO"; break; - } - break; - case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN - * What used to be called Serbo-Croatian - * should really now be two separate - * languages because of political reasons. - * (Says tml, who knows nothing about Serbian - * or Croatian.) - * (I can feel those flames coming already.) - */ - switch (sub) - { - case SUBLANG_SERBIAN_LATIN: l = "sp"; break; - case SUBLANG_SERBIAN_CYRILLIC: l = "sr"; break; - default: l = "hr"; /* ??? */ - } - break; - case LANG_CZECH: l = "cs"; break; - case LANG_DANISH: l = "da"; break; - case LANG_DUTCH: - l = "nl"; - switch (sub) - { - case SUBLANG_DUTCH_BELGIAN: sl = "BE"; break; - } - break; - case LANG_ENGLISH: - l = "en"; - switch (sub) - { - /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought - * English was the language spoken in England. - * Oh well. - */ - case SUBLANG_ENGLISH_UK: sl = "GB"; break; - case SUBLANG_ENGLISH_AUS: sl = "AU"; break; - case SUBLANG_ENGLISH_CAN: sl = "CA"; break; - case SUBLANG_ENGLISH_NZ: sl = "NZ"; break; - case SUBLANG_ENGLISH_EIRE: sl = "IE"; break; - case SUBLANG_ENGLISH_SOUTH_AFRICA: sl = "ZA"; break; - case SUBLANG_ENGLISH_JAMAICA: sl = "JM"; break; - case SUBLANG_ENGLISH_CARIBBEAN: sl = "@caribbean"; break; /* ??? */ - case SUBLANG_ENGLISH_BELIZE: sl = "BZ"; break; - case SUBLANG_ENGLISH_TRINIDAD: sl = "TT"; break; - case SUBLANG_ENGLISH_ZIMBABWE: sl = "ZW"; break; - case SUBLANG_ENGLISH_PHILIPPINES: sl = "PH"; break; - } - break; - case LANG_ESTONIAN: l = "et"; break; - case LANG_FAEROESE: l = "fo"; break; - case LANG_FARSI: l = "fa"; break; - case LANG_FINNISH: l = "fi"; break; - case LANG_FRENCH: - l = "fr"; - switch (sub) - { - case SUBLANG_FRENCH_BELGIAN: sl = "BE"; break; - case SUBLANG_FRENCH_CANADIAN: sl = "CA"; break; - case SUBLANG_FRENCH_SWISS: sl = "CH"; break; - case SUBLANG_FRENCH_LUXEMBOURG: sl = "LU"; break; - case SUBLANG_FRENCH_MONACO: sl = "MC"; break; - } - break; - case LANG_GEORGIAN: l = "ka"; break; - case LANG_GERMAN: - l = "de"; - switch (sub) - { - case SUBLANG_GERMAN_SWISS: sl = "CH"; break; - case SUBLANG_GERMAN_AUSTRIAN: sl = "AT"; break; - case SUBLANG_GERMAN_LUXEMBOURG: sl = "LU"; break; - case SUBLANG_GERMAN_LIECHTENSTEIN: sl = "LI"; break; - } - break; - case LANG_GREEK: l = "el"; break; - case LANG_GUJARATI: l = "gu"; break; - case LANG_HEBREW: l = "he"; break; - case LANG_HINDI: l = "hi"; break; - case LANG_HUNGARIAN: l = "hu"; break; - case LANG_ICELANDIC: l = "is"; break; - case LANG_INDONESIAN: l = "id"; break; - case LANG_ITALIAN: - l = "it"; - switch (sub) - { - case SUBLANG_ITALIAN_SWISS: sl = "CH"; break; - } - break; - case LANG_JAPANESE: l = "ja"; break; - case LANG_KANNADA: l = "kn"; break; - case LANG_KASHMIRI: - l = "ks"; - switch (sub) - { - case SUBLANG_KASHMIRI_INDIA: sl = "IN"; break; - } - break; - case LANG_KAZAK: l = "kk"; break; - case LANG_KONKANI: l = "kok"; break; /* ??? */ - case LANG_KOREAN: l = "ko"; break; - case LANG_LATVIAN: l = "lv"; break; - case LANG_LITHUANIAN: l = "lt"; break; - case LANG_MACEDONIAN: l = "mk"; break; - case LANG_MALAY: - l = "ms"; - switch (sub) - { - case SUBLANG_MALAY_BRUNEI_DARUSSALAM: sl = "BN"; break; - } - break; - case LANG_MALAYALAM: l = "ml"; break; - case LANG_MANIPURI: l = "mni"; break; - case LANG_MARATHI: l = "mr"; break; - case LANG_NEPALI: - l = "ne"; - switch (sub) - { - case SUBLANG_NEPALI_INDIA: sl = "IN"; break; - } - break; - case LANG_NORWEGIAN: - l = "no"; - switch (sub) - { - /* SUBLANG_NORWEGIAN_BOKMAL == SUBLANG_DEFAULT */ - case SUBLANG_NORWEGIAN_NYNORSK: l = "nn"; break; - } - break; - case LANG_ORIYA: l = "or"; break; - case LANG_POLISH: l = "pl"; break; - case LANG_PORTUGUESE: - l = "pt"; - switch (sub) - { - /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT */ - case SUBLANG_PORTUGUESE_BRAZILIAN: sl = "BR"; break; - } - break; - case LANG_PUNJABI: l = "pa"; break; - case LANG_ROMANIAN: l = "ro"; break; - case LANG_RUSSIAN: l = "ru"; break; - case LANG_SANSKRIT: l = "sa"; break; - case LANG_SINDHI: l = "sd"; break; - case LANG_SLOVAK: l = "sk"; break; - case LANG_SLOVENIAN: l = "sl"; break; - case LANG_SPANISH: - l = "es"; - switch (sub) - { - case SUBLANG_SPANISH_MEXICAN: sl = "MX"; break; - case SUBLANG_SPANISH_MODERN: sl = "@modern"; break; /* ??? */ - case SUBLANG_SPANISH_GUATEMALA: sl = "GT"; break; - case SUBLANG_SPANISH_COSTA_RICA: sl = "CR"; break; - case SUBLANG_SPANISH_PANAMA: sl = "PA"; break; - case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: sl = "DO"; break; - case SUBLANG_SPANISH_VENEZUELA: sl = "VE"; break; - case SUBLANG_SPANISH_COLOMBIA: sl = "CO"; break; - case SUBLANG_SPANISH_PERU: sl = "PE"; break; - case SUBLANG_SPANISH_ARGENTINA: sl = "AR"; break; - case SUBLANG_SPANISH_ECUADOR: sl = "EC"; break; - case SUBLANG_SPANISH_CHILE: sl = "CL"; break; - case SUBLANG_SPANISH_URUGUAY: sl = "UY"; break; - case SUBLANG_SPANISH_PARAGUAY: sl = "PY"; break; - case SUBLANG_SPANISH_BOLIVIA: sl = "BO"; break; - case SUBLANG_SPANISH_EL_SALVADOR: sl = "SV"; break; - case SUBLANG_SPANISH_HONDURAS: sl = "HN"; break; - case SUBLANG_SPANISH_NICARAGUA: sl = "NI"; break; - case SUBLANG_SPANISH_PUERTO_RICO: sl = "PR"; break; - } - break; - case LANG_SWAHILI: l = "sw"; break; - case LANG_SWEDISH: - l = "sv"; - switch (sub) - { - case SUBLANG_SWEDISH_FINLAND: sl = "FI"; break; - } - break; - case LANG_TAMIL: l = "ta"; break; - case LANG_TATAR: l = "tt"; break; - case LANG_TELUGU: l = "te"; break; - case LANG_THAI: l = "th"; break; - case LANG_TURKISH: l = "tr"; break; - case LANG_UKRAINIAN: l = "uk"; break; - case LANG_URDU: - l = "ur"; - switch (sub) - { - case SUBLANG_URDU_PAKISTAN: sl = "PK"; break; - case SUBLANG_URDU_INDIA: sl = "IN"; break; - } - break; - case LANG_UZBEK: - l = "uz"; - switch (sub) - { - case SUBLANG_UZBEK_CYRILLIC: sl = "@cyrillic"; break; - } - break; - case LANG_VIETNAMESE: l = "vi"; break; - default: l = "xx"; break; - } - strcpy (bfr, l); - if (sl != NULL) - { - if (sl[0] != '@') - strcat (bfr, "_"); - strcat (bfr, sl); - } - - return g_strdup (bfr); -} - -/** - * g_win32_error_message: - * @error: error code - * - * Translate a Win32 error code (as returned by GetLastError()) into - * the corresponding message. The message is either language neutral, - * or in the thread's language, or the user's language, the system's - * langauge, or US English (see docs for FormatMessage). The returned - * string should be deallocated with g_free(). - * - * Returns: allocated error message - */ -gchar * -g_win32_error_message (gint error) -{ - gchar *msg; - gchar *retval; - int nbytes; - - FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER - |FORMAT_MESSAGE_IGNORE_INSERTS - |FORMAT_MESSAGE_FROM_SYSTEM, - NULL, error, 0, - (LPTSTR) &msg, 0, NULL); - nbytes = strlen (msg); - - if (nbytes > 2 && msg[nbytes-1] == '\n' && msg[nbytes-2] == '\r') - msg[nbytes-2] = '\0'; - - retval = g_strdup (msg); - - if (msg != NULL) - LocalFree (msg); - - return retval; -} - -static gchar * -get_package_directory_from_module (gchar *module_name) -{ - static GHashTable *module_dirs = NULL; - HMODULE hmodule = NULL; - gchar *fn; - gchar *p; - gchar *result; - - if (module_dirs == NULL) - module_dirs = g_hash_table_new (g_str_hash, g_str_equal); - - result = g_hash_table_lookup (module_dirs, module_name ? module_name : ""); - - if (result) - return g_strdup (result); - - if (module_name) - { - hmodule = GetModuleHandle (module_name); - if (!hmodule) - return NULL; - } - - fn = g_malloc (MAX_PATH); - if (!GetModuleFileName (hmodule, fn, MAX_PATH)) - return NULL; - -#ifdef G_WITH_CYGWIN - /* In Cygwin we need to have POSIX paths */ - { - gchar tmp[MAX_PATH]; - - cygwin_conv_to_posix_path(fn, tmp); - g_free(fn); - fn = g_strdup(tmp); - } -#endif - - if ((p = strrchr (fn, G_DIR_SEPARATOR)) != NULL) - *p = '\0'; - - if (module_name) - { - p = strrchr (fn, G_DIR_SEPARATOR); - if (p && (g_strcasecmp (p + 1, "bin") == 0 || - g_strcasecmp (p + 1, "lib") == 0)) - *p = '\0'; - } - - g_hash_table_insert (module_dirs, module_name ? module_name : "", fn); - - return g_strdup (fn); -} - -/** - * g_win32_get_package_installation_directory: - * @package: An identifier for a software package, or NULL - * @dll_name: The name of a DLL that a package provides, or NULL - * - * Try to determine the installation directory for a software package. - * Typically used by GNU software packages. - * - * @package should be a short identifier for the package. Typically it - * is the same identifier as used for GETTEXT_PACKAGE in software - * configured accoring to GNU standards. The function first looks in - * the Windows Registry for the value #InstallationDirectory in the - * key #HKLM\Software\@package, and if that value exists and is a - * string, returns that. - * - * If @package is NULL, or the above value isn't found in the - * Registry, but @dll_name is non-NULL, it should name a DLL loaded - * into the current process. Typically that would be the name of the - * DLL calling this function, looking for its installation - * directory. The function then asks Windows what directory that DLL - * was loaded from. If that directory's last component is "bin" or - * "lib", the parent directory is returned, otherwise the directory - * itself. If that DLL isn't loaded, the function proceeds as if - * @dll_name was NULL. - * - * If both @package and @dll_name are NULL, the directory from where - * the main executable of the process was loaded is uses instead in - * the same way as above. - * - * The return value should be freed with g_free() when not needed any longer. */ - -gchar * -g_win32_get_package_installation_directory (gchar *package, - gchar *dll_name) -{ - static GHashTable *package_dirs = NULL; - gchar *result = NULL; - gchar *key; - HKEY reg_key = NULL; - DWORD type; - DWORD nbytes; - - if (package != NULL) - { - if (package_dirs == NULL) - package_dirs = g_hash_table_new (g_str_hash, g_str_equal); - - result = g_hash_table_lookup (package_dirs, package); - - if (result && result[0]) - return g_strdup (result); - - key = g_strconcat ("Software\\", package, NULL); - - nbytes = 0; - if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, key, 0, - KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS - && RegQueryValueEx (reg_key, "InstallationDirectory", 0, - &type, NULL, &nbytes) == ERROR_SUCCESS - && type == REG_SZ) - { - result = g_malloc (nbytes + 1); - RegQueryValueEx (reg_key, "InstallationDirectory", 0, - &type, result, &nbytes); - result[nbytes] = '\0'; - } - - if (reg_key != NULL) - RegCloseKey (reg_key); - - g_free (key); - - } - if (result) - { - g_hash_table_insert (package_dirs, package, result); - return g_strdup (result); - } - - if (dll_name != NULL) - result = get_package_directory_from_module (dll_name); - - if (result == NULL) - result = get_package_directory_from_module (NULL); - - return result; -} - -/** - * g_win32_get_package_installation_subdirectory: - * @package: An identifier for a software package, or NULL - * @dll_name: The name of a DLL that a package provides, or NULL - * @subdir: A subdirectory of the package installation directory. - * - * Returns a string containg the path of the subdirectory @subdir in - * the return value from calling - * g_win32_get_package_installation_directory() with the @package and - * @dll_name parameters. The return value should be freed with - * g_free() when no longer needed. - */ - -gchar * -g_win32_get_package_installation_subdirectory (gchar *package, - gchar *dll_name, - gchar *subdir) -{ - gchar *prefix; - gchar *sep; - - prefix = g_win32_get_package_installation_directory (package, dll_name); - - sep = (prefix[strlen (prefix) - 1] == G_DIR_SEPARATOR ? - "" : G_DIR_SEPARATOR_S); - - return g_strconcat (prefix, sep, subdir, NULL); -} diff --git a/gwin32.h b/gwin32.h deleted file mode 100644 index d3592490a..000000000 --- a/gwin32.h +++ /dev/null @@ -1,130 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __G_WIN32_H__ -#define __G_WIN32_H__ - -#include <gtypes.h> - -#ifdef G_PLATFORM_WIN32 - -/* Windows emulation stubs for common Unix functions - */ - -G_BEGIN_DECLS - -#ifndef MAXPATHLEN -#define MAXPATHLEN 1024 -#endif - -#ifdef _MSC_VER -typedef int pid_t; -#endif - -#ifdef G_OS_WIN32 - -/* - * To get prototypes for the following POSIXish functions, you have to - * include the indicated non-POSIX headers. The functions are defined - * in OLDNAMES.LIB (MSVC) or -lmoldname-msvc (mingw32). - * - * getcwd: <direct.h> (MSVC), <io.h> (mingw32) - * getpid: <process.h> - * access: <io.h> - * unlink: <stdio.h> or <io.h> - * open, read, write, lseek, close: <io.h> - * rmdir: <direct.h> - * pipe: <direct.h> - */ - -/* pipe is not in OLDNAMES.LIB or -lmoldname-msvc. */ -#define pipe(phandles) _pipe (phandles, 4096, _O_BINARY) - -/* For some POSIX functions that are not provided by the MS runtime, - * we provide emulators in glib, which are prefixed with g_win32_. - */ -# define ftruncate(fd, size) g_win32_ftruncate (fd, size) - -/* -lmingw32 also has emulations for these, but we need our own - * for MSVC anyhow, so we might aswell use them always. - */ -# define opendir g_win32_opendir -# define readdir g_win32_readdir -# define rewinddir g_win32_rewinddir -# define closedir g_win32_closedir -# define NAME_MAX 255 - -struct dirent -{ - gchar d_name[NAME_MAX + 1]; -}; - -struct DIR -{ - gchar *dir_name; - gboolean just_opened; - guint find_file_handle; - gpointer find_file_data; - struct dirent readdir_result; -}; -typedef struct DIR DIR; - -/* emulation functions */ -gint g_win32_ftruncate (gint f, - guint size); -DIR* g_win32_opendir (const gchar *dirname); -struct dirent* g_win32_readdir (DIR *dir); -void g_win32_rewinddir (DIR *dir); -gint g_win32_closedir (DIR *dir); - -#endif /* G_OS_WIN32 */ - -/* The MS setlocale uses locale names of the form "English_United - * States.1252" etc. We want the Unixish standard form "en", "zh_TW" - * etc. This function gets the current thread locale from Windows and - * returns it as a string of the above form for use in forming file - * names etc. The returned string should be deallocated with g_free(). - */ -gchar* g_win32_getlocale (void); - -/* Translate a Win32 error code (as returned by GetLastError()) into - * the corresponding message. The returned string should be deallocated - * with g_free(). - */ -gchar* g_win32_error_message (gint error); - -gchar* g_win32_get_package_installation_directory (gchar *package, - gchar *dll_name); - -gchar* g_win32_get_package_installation_subdirectory (gchar *package, - gchar *dll_name, - gchar *subdir); - -G_END_DECLS - -#endif /* G_PLATFORM_WIN32 */ - -#endif /* __G_WIN32_H__ */ diff --git a/testgdate.c b/testgdate.c deleted file mode 100644 index 01365f3f9..000000000 --- a/testgdate.c +++ /dev/null @@ -1,489 +0,0 @@ -#ifdef GLIB_COMPILATION -#undef GLIB_COMPILATION -#endif - -#include "glib.h" - -#include <stdio.h> -#include <string.h> -#include <locale.h> -#include <time.h> - -gboolean failed = FALSE; -guint32 passed = 0; -guint32 notpassed = 0; - -#define TEST(m,cond) G_STMT_START { failed = !(cond); \ -if (failed) \ - { ++notpassed; \ - if (!m) \ - g_print ("\n(%s:%d) failed for: %s\n", __FILE__, __LINE__, ( # cond )); \ - else \ - g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \ - } \ -else \ - ++passed; \ - if ((passed+notpassed) % 10000 == 0) g_print ("."); fflush (stdout); \ -} G_STMT_END - -void g_date_debug_print(GDate* d) -{ - if (!d) g_print("NULL!\n"); - else - g_print("julian: %u (%s) DMY: %u %u %u (%s)\n", - d->julian_days, - d->julian ? "valid" : "invalid", - d->day, - d->month, - d->year, - d->dmy ? "valid" : "invalid"); - - fflush(stdout); -} - -int main(int argc, char** argv) -{ - GDate* d; - guint32 j; - GDateMonth m; - GDateYear y, prev_y; - GDateDay day; - gchar buf[101]; - gchar* loc; - /* Try to get all the leap year cases. */ - GDateYear check_years[] = { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 98, 99, 100, 101, 102, 103, 397, - 398, 399, 400, 401, 402, 403, 404, 405, 406, - 1598, 1599, 1600, 1601, 1602, 1650, 1651, - 1897, 1898, 1899, 1900, 1901, 1902, 1903, - 1961, 1962, 1963, 1964, 1965, 1967, - 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, - 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, - 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, - 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, - 3000, 3001, 3002, 3998, 3999, 4000, 4001, 4002, 4003 - }; - guint n_check_years = sizeof(check_years)/sizeof(GDateYear); - guint i; - gboolean discontinuity; - - g_print("checking GDate..."); - - TEST("sizeof(GDate) is not more than 8 bytes on this platform", sizeof(GDate) < 9); - - d = g_date_new(); - - TEST("Empty constructor produces invalid date", !g_date_valid(d)); - - g_date_free(d); - - d = g_date_new_dmy(1,1,1); - - TEST("January 1, Year 1 created and valid", g_date_valid(d)); - - j = g_date_get_julian(d); - - TEST("January 1, Year 1 is Julian date 1", j == 1); - - TEST("Returned month is January", g_date_get_month(d) == G_DATE_JANUARY); - TEST("Returned day is 1", g_date_get_day(d) == 1); - TEST("Returned year is 1", g_date_get_year(d) == 1); - - TEST("Bad month is invalid", !g_date_valid_month(G_DATE_BAD_MONTH)); - TEST("Month 13 is invalid", !g_date_valid_month(13)); - TEST("Bad day is invalid", !g_date_valid_day(G_DATE_BAD_DAY)); - TEST("Day 32 is invalid", !g_date_valid_day(32)); - TEST("Bad year is invalid", !g_date_valid_year(G_DATE_BAD_YEAR)); - TEST("Bad julian is invalid", !g_date_valid_julian(G_DATE_BAD_JULIAN)); - TEST("Bad weekday is invalid", !g_date_valid_weekday(G_DATE_BAD_WEEKDAY)); - TEST("Year 2000 is a leap year", g_date_is_leap_year(2000)); - TEST("Year 1999 is not a leap year", !g_date_is_leap_year(1999)); - TEST("Year 1996 is a leap year", g_date_is_leap_year(1996)); - TEST("Year 1600 is a leap year", g_date_is_leap_year(1600)); - TEST("Year 2100 is not a leap year", !g_date_is_leap_year(2100)); - TEST("Year 1800 is not a leap year", !g_date_is_leap_year(1800)); - - g_date_free(d); - - loc = setlocale(LC_ALL,""); - if (loc) - g_print("\nLocale set to %s\n", loc); - else - g_print("\nLocale unchanged\n"); - - d = g_date_new(); - g_date_set_time(d, time(NULL)); - TEST("Today is valid", g_date_valid(d)); - - g_date_strftime(buf,100,"Today is a %A, %x\n", d); - g_print("%s", buf); - - g_date_set_time(d, 1); - TEST("Beginning of Unix epoch is valid", g_date_valid(d)); - - g_date_strftime(buf,100,"1 second into the Unix epoch it was a %A, in the month of %B, %x\n", d); - g_print("%s", buf); - - g_date_set_julian(d, 1); - TEST("GDate's \"Julian\" epoch's first day is valid", g_date_valid(d)); - - g_date_strftime(buf,100,"Our \"Julian\" epoch begins on a %A, in the month of %B, %x\n", - d); - g_print("%s", buf); - - g_date_set_dmy(d, 10, 1, 2000); - - g_date_strftime(buf,100,"%x", d); - - g_date_set_parse(d, buf); - /* Note: this test will hopefully work, but no promises. */ - TEST("Successfully parsed a %x-formatted string", - g_date_valid(d) && - g_date_get_month(d) == 1 && - g_date_get_day(d) == 10 && - g_date_get_year(d) == 2000); - if (failed) - g_date_debug_print(d); - - g_date_free(d); - - j = G_DATE_BAD_JULIAN; - - i = 0; - discontinuity = TRUE; - y = check_years[0]; - prev_y = G_DATE_BAD_YEAR; - while (i < n_check_years) - { - guint32 first_day_of_year = G_DATE_BAD_JULIAN; - guint16 days_in_year = g_date_is_leap_year(y) ? 366 : 365; - guint sunday_week_of_year = 0; - guint sunday_weeks_in_year = g_date_get_sunday_weeks_in_year(y); - guint monday_week_of_year = 0; - guint monday_weeks_in_year = g_date_get_monday_weeks_in_year(y); - - if (discontinuity) - g_print(" (Break in sequence of requested years to check)\n"); - - g_print("Checking year %u", y); - - TEST("Year is valid", g_date_valid_year(y)); - - TEST("Number of Sunday weeks in year is 52 or 53", - sunday_weeks_in_year == 52 || sunday_weeks_in_year == 53); - - TEST("Number of Monday weeks in year is 52 or 53", - monday_weeks_in_year == 52 || monday_weeks_in_year == 53); - - m = 1; - while (m < 13) - { - guint8 dim = g_date_get_days_in_month(m,y); - GDate days[31]; /* This is the fast way, no allocation */ - - TEST("Sensible number of days in month", (dim > 0 && dim < 32)); - - TEST("Month between 1 and 12 is valid", g_date_valid_month(m)); - - day = 1; - - g_date_clear(days, 31); - - while (day <= dim) - { - guint i; - GDate tmp; - - TEST("DMY triplet is valid", g_date_valid_dmy(day,m,y)); - - /* Create GDate with triplet */ - - d = &days[day-1]; - - TEST("Cleared day is invalid", !g_date_valid(d)); - - g_date_set_dmy(d,day,m,y); - - TEST("Set day is valid", g_date_valid(d)); - - if (m == G_DATE_JANUARY && day == 1) - { - first_day_of_year = g_date_get_julian(d); - } - - g_assert(first_day_of_year != G_DATE_BAD_JULIAN); - - TEST("Date with DMY triplet is valid", g_date_valid(d)); - TEST("Month accessor works", g_date_get_month(d) == m); - TEST("Year accessor works", g_date_get_year(d) == y); - TEST("Day of month accessor works", g_date_get_day(d) == day); - - TEST("Day of year is consistent with Julian dates", - ((g_date_get_julian(d) + 1 - first_day_of_year) == - (g_date_get_day_of_year(d)))); - - if (failed) - { - g_print("first day: %u this day: %u day of year: %u\n", - first_day_of_year, - g_date_get_julian(d), - g_date_get_day_of_year(d)); - } - - if (m == G_DATE_DECEMBER && day == 31) - { - TEST("Last day of year equals number of days in year", - g_date_get_day_of_year(d) == days_in_year); - if (failed) - { - g_print("last day: %u days in year: %u\n", - g_date_get_day_of_year(d), days_in_year); - } - } - - TEST("Day of year is not more than number of days in the year", - g_date_get_day_of_year(d) <= days_in_year); - - TEST("Monday week of year is not more than number of weeks in the year", - g_date_get_monday_week_of_year(d) <= monday_weeks_in_year); - if (failed) - { - g_print("Weeks in year: %u\n", monday_weeks_in_year); - g_date_debug_print(d); - } - TEST("Monday week of year is >= than last week of year", - g_date_get_monday_week_of_year(d) >= monday_week_of_year); - - if (g_date_get_weekday(d) == G_DATE_MONDAY) - { - - TEST("Monday week of year on Monday 1 more than previous day's week of year", - (g_date_get_monday_week_of_year(d) - monday_week_of_year) == 1); - } - else - { - TEST("Monday week of year on non-Monday 0 more than previous day's week of year", - (g_date_get_monday_week_of_year(d) - monday_week_of_year) == 0); - } - - - monday_week_of_year = g_date_get_monday_week_of_year(d); - - - TEST("Sunday week of year is not more than number of weeks in the year", - g_date_get_sunday_week_of_year(d) <= sunday_weeks_in_year); - if (failed) - { - g_date_debug_print(d); - } - TEST("Sunday week of year is >= than last week of year", - g_date_get_sunday_week_of_year(d) >= sunday_week_of_year); - - if (g_date_get_weekday(d) == G_DATE_SUNDAY) - { - TEST("Sunday week of year on Sunday 1 more than previous day's week of year", - (g_date_get_sunday_week_of_year(d) - sunday_week_of_year) == 1); - } - else - { - TEST("Sunday week of year on non-Sunday 0 more than previous day's week of year", - (g_date_get_sunday_week_of_year(d) - sunday_week_of_year) == 0); - } - - sunday_week_of_year = g_date_get_sunday_week_of_year(d); - - TEST("Date is equal to itself", - g_date_compare(d,d) == 0); - - - /*************** Increments ***********/ - - i = 1; - while (i < 402) /* Need to get 400 year increments in */ - { - - /***** Days ******/ - tmp = *d; - g_date_add_days(d, i); - - TEST("Adding days gives a value greater than previous", - g_date_compare(d, &tmp) > 0); - - g_date_subtract_days(d, i); - TEST("Forward days then backward days returns us to current day", - g_date_get_day(d) == day); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - - TEST("Forward days then backward days returns us to current month", - g_date_get_month(d) == m); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - - TEST("Forward days then backward days returns us to current year", - g_date_get_year(d) == y); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - - /******* Months ********/ - - tmp = *d; - g_date_add_months(d, i); - TEST("Adding months gives a larger value", - g_date_compare(d, &tmp) > 0); - g_date_subtract_months(d, i); - - TEST("Forward months then backward months returns us to current month", - g_date_get_month(d) == m); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - - TEST("Forward months then backward months returns us to current year", - g_date_get_year(d) == y); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - - - if (day < 29) - { - /* Day should be unchanged */ - - TEST("Forward months then backward months returns us to current day", - g_date_get_day(d) == day); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - } - else - { - /* reset the day for later tests */ - g_date_set_day(d, day); - } - - /******* Years ********/ - - tmp = *d; - g_date_add_years(d, i); - - TEST("Adding years gives a larger value", - g_date_compare(d,&tmp) > 0); - - g_date_subtract_years(d, i); - - TEST("Forward years then backward years returns us to current month", - g_date_get_month(d) == m); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - - TEST("Forward years then backward years returns us to current year", - g_date_get_year(d) == y); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - - if (m != 2 && day != 29) - { - TEST("Forward years then backward years returns us to current day", - g_date_get_day(d) == day); - - if (failed) - { - g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y); - g_date_debug_print(d); - } - } - else - { - g_date_set_day(d, day); /* reset */ - } - - i += 10; - } - - /***** increment test relative to our local Julian count */ - - if (!discontinuity) { - - /* We can only run sequence tests between sequential years */ - - TEST("Julians are sequential with increment 1", - j+1 == g_date_get_julian(d)); - if (failed) - { - g_print("Out of sequence, prev: %u expected: %u got: %u\n", - j, j+1, g_date_get_julian(d)); - } - - g_date_add_days(d,1); - TEST("Next day has julian 1 higher", - g_date_get_julian(d) == j + 2); - g_date_subtract_days(d, 1); - - if (j != G_DATE_BAD_JULIAN) - { - g_date_subtract_days(d, 1); - - TEST("Previous day has julian 1 lower", - g_date_get_julian(d) == j); - - g_date_add_days(d, 1); /* back to original */ - } - } - discontinuity = FALSE; /* goes away now */ - - fflush(stdout); - fflush(stderr); - - j = g_date_get_julian(d); /* inc current julian */ - - ++day; - } - ++m; - } - g_print(" done\n"); - ++i; - prev_y = y; - y = check_years[i]; - if (prev_y == G_DATE_BAD_YEAR || - (prev_y + 1) != y) discontinuity = TRUE; - } - - - g_print("\n%u tests passed, %u failed\n",passed, notpassed); - - return 0; -} - - diff --git a/testgdateparser.c b/testgdateparser.c deleted file mode 100644 index c6be8238b..000000000 --- a/testgdateparser.c +++ /dev/null @@ -1,112 +0,0 @@ -#ifdef GLIB_COMPILATION -#undef GLIB_COMPILATION -#endif - -#include "glib.h" - -#include <stdio.h> -#include <string.h> -#include <locale.h> - -void g_date_debug_print(GDate* d) -{ - if (!d) g_print("NULL!\n"); - else - g_print("julian: %u (%s) DMY: %u %u %u (%s)\n", - d->julian_days, - d->julian ? "valid" : "invalid", - d->day, - d->month, - d->year, - d->dmy ? "valid" : "invalid"); - - fflush(stdout); -} - -/* These only work in the POSIX locale, maybe C too - - * type POSIX into the program to check them - */ -char* posix_tests [] = { - "19981024", - "981024", - "October 1998", - "October 98", - "oCT 98", - "10/24/98", - "10 -- 24 -- 98", - "10/24/1998", - "October 24, 1998", - NULL -}; - -int main(int argc, char** argv) -{ - GDate* d; - gchar* loc; - gchar input[1024]; - - loc = setlocale(LC_ALL,""); - if (loc) - g_print("\nLocale set to %s\n", loc); - else - g_print("\nLocale unchanged\n"); - - d = g_date_new(); - - while (fgets(input, 1023, stdin)) - { - if (input[0] == '\n') - { - g_print("Enter a date to parse and press enter, or type `POSIX':\n"); - continue; - } - - if (strcmp(input,"POSIX\n") == 0) - { - char** s = posix_tests; - while (*s) { - g_date_set_parse(d, *s); - - g_print("POSIXy parse test `%s' ...", *s); - - if (!g_date_valid(d)) - { - g_print(" failed.\n"); - } - else - { - gchar buf[256]; - - g_date_strftime(buf,100," parsed `%x' (%B %d %Y)\n", - d); - g_print("%s", buf); - } - - ++s; - } - } - else - { - g_date_set_parse(d, input); - - if (!g_date_valid(d)) - { - g_print("Parse failed.\n"); - } - else - { - gchar buf[256]; - - g_date_strftime(buf,100,"Parsed: `%x' (%B %d %Y)\n", - d); - g_print("%s", buf); - } - } - } - - g_date_free(d); - - return 0; -} - - diff --git a/testglib.c b/testglib.c deleted file mode 100644 index ec058616d..000000000 --- a/testglib.c +++ /dev/null @@ -1,1252 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. - */ - -#include "config.h" - -#undef G_LOG_DOMAIN - -#ifdef GLIB_COMPILATION -#undef GLIB_COMPILATION -#endif - -#include <stdio.h> -#include <string.h> -#include <errno.h> - -#include "glib.h" - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#ifdef G_OS_WIN32 -#include <io.h> /* For read(), write() etc */ -#endif - -static int array[10000]; -static gboolean failed = FALSE; - -#define TEST(m,cond) G_STMT_START { failed = !(cond); \ -if (failed) \ - { if (!m) \ - g_print ("\n(%s:%d) failed for: %s\n", __FILE__, __LINE__, ( # cond )); \ - else \ - g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \ - } \ -else \ - g_print ("."); fflush (stdout); \ -} G_STMT_END - -#define C2P(c) ((gpointer) ((long) (c))) -#define P2C(p) ((gchar) ((long) (p))) - -#define GLIB_TEST_STRING "el dorado " -#define GLIB_TEST_STRING_5 "el do" - -static gboolean -node_build_string (GNode *node, - gpointer data) -{ - gchar **p = data; - gchar *string; - gchar c[2] = "_"; - - c[0] = P2C (node->data); - - string = g_strconcat (*p ? *p : "", c, NULL); - g_free (*p); - *p = string; - - return FALSE; -} - -static void -g_node_test (void) -{ - GNode *root; - GNode *node; - GNode *node_B; - GNode *node_F; - GNode *node_G; - GNode *node_J; - guint i; - gchar *tstring, *cstring; - - g_print ("checking n-way trees: "); - failed = FALSE; - - root = g_node_new (C2P ('A')); - TEST (NULL, g_node_depth (root) == 1 && g_node_max_height (root) == 1); - - node_B = g_node_new (C2P ('B')); - g_node_append (root, node_B); - TEST (NULL, root->children == node_B); - - g_node_append_data (node_B, C2P ('E')); - g_node_prepend_data (node_B, C2P ('C')); - g_node_insert (node_B, 1, g_node_new (C2P ('D'))); - - node_F = g_node_new (C2P ('F')); - g_node_append (root, node_F); - TEST (NULL, root->children->next == node_F); - - node_G = g_node_new (C2P ('G')); - g_node_append (node_F, node_G); - node_J = g_node_new (C2P ('J')); - g_node_prepend (node_G, node_J); - g_node_insert (node_G, 42, g_node_new (C2P ('K'))); - g_node_insert_data (node_G, 0, C2P ('H')); - g_node_insert (node_G, 1, g_node_new (C2P ('I'))); - - TEST (NULL, g_node_depth (root) == 1); - TEST (NULL, g_node_max_height (root) == 4); - TEST (NULL, g_node_depth (node_G->children->next) == 4); - TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_LEAFS) == 7); - TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_NON_LEAFS) == 4); - TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_ALL) == 11); - TEST (NULL, g_node_max_height (node_F) == 3); - TEST (NULL, g_node_n_children (node_G) == 4); - TEST (NULL, g_node_find_child (root, G_TRAVERSE_ALL, C2P ('F')) == node_F); - TEST (NULL, g_node_find (root, G_LEVEL_ORDER, G_TRAVERSE_NON_LEAFS, C2P ('I')) == NULL); - TEST (NULL, g_node_find (root, G_IN_ORDER, G_TRAVERSE_LEAFS, C2P ('J')) == node_J); - - for (i = 0; i < g_node_n_children (node_B); i++) - { - node = g_node_nth_child (node_B, i); - TEST (NULL, P2C (node->data) == ('C' + i)); - } - - for (i = 0; i < g_node_n_children (node_G); i++) - TEST (NULL, g_node_child_position (node_G, g_node_nth_child (node_G, i)) == i); - - /* we have built: A - * / \ - * B F - * / | \ \ - * C D E G - * / /\ \ - * H I J K - * - * for in-order traversal, 'G' is considered to be the "left" - * child of 'F', which will cause 'F' to be the last node visited. - */ - - tstring = NULL; - g_node_traverse (root, G_PRE_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); - TEST (tstring, strcmp (tstring, "ABCDEFGHIJK") == 0); - g_free (tstring); tstring = NULL; - g_node_traverse (root, G_POST_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); - TEST (tstring, strcmp (tstring, "CDEBHIJKGFA") == 0); - g_free (tstring); tstring = NULL; - g_node_traverse (root, G_IN_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); - TEST (tstring, strcmp (tstring, "CBDEAHGIJKF") == 0); - g_free (tstring); tstring = NULL; - g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); - TEST (tstring, strcmp (tstring, "ABFCDEGHIJK") == 0); - g_free (tstring); tstring = NULL; - - g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_LEAFS, -1, node_build_string, &tstring); - TEST (tstring, strcmp (tstring, "CDEHIJK") == 0); - g_free (tstring); tstring = NULL; - g_node_traverse (root, G_PRE_ORDER, G_TRAVERSE_NON_LEAFS, -1, node_build_string, &tstring); - TEST (tstring, strcmp (tstring, "ABFG") == 0); - g_free (tstring); tstring = NULL; - - g_node_reverse_children (node_B); - g_node_reverse_children (node_G); - - g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); - TEST (tstring, strcmp (tstring, "ABFEDCGKJIH") == 0); - g_free (tstring); tstring = NULL; - - cstring = NULL; - node = g_node_copy (root); - TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_ALL) == g_node_n_nodes (node, G_TRAVERSE_ALL)); - TEST (NULL, g_node_max_height (root) == g_node_max_height (node)); - g_node_traverse (root, G_IN_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); - g_node_traverse (node, G_IN_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &cstring); - TEST (cstring, strcmp (tstring, cstring) == 0); - g_free (tstring); tstring = NULL; - g_free (cstring); cstring = NULL; - g_node_destroy (node); - - g_node_destroy (root); - - /* allocation tests */ - - root = g_node_new (NULL); - node = root; - - for (i = 0; i < 2048; i++) - { - g_node_append (node, g_node_new (NULL)); - if ((i%5) == 4) - node = node->children->next; - } - TEST (NULL, g_node_max_height (root) > 100); - TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_ALL) == 1 + 2048); - - g_node_destroy (root); - - if (!failed) - g_print ("ok\n"); -} - -static gboolean -my_hash_callback_remove (gpointer key, - gpointer value, - gpointer user_data) -{ - int *d = value; - - if ((*d) % 2) - return TRUE; - - return FALSE; -} - -static void -my_hash_callback_remove_test (gpointer key, - gpointer value, - gpointer user_data) -{ - int *d = value; - - if ((*d) % 2) - g_print ("bad!\n"); -} - -static void -my_hash_callback (gpointer key, - gpointer value, - gpointer user_data) -{ - int *d = value; - *d = 1; -} - -static guint -my_hash (gconstpointer key) -{ - return (guint) *((const gint*) key); -} - -static gboolean -my_hash_equal (gconstpointer a, - gconstpointer b) -{ - return *((const gint*) a) == *((const gint*) b); -} - -static gint -my_list_compare_one (gconstpointer a, gconstpointer b) -{ - gint one = *((const gint*)a); - gint two = *((const gint*)b); - return one-two; -} - -static gint -my_list_compare_two (gconstpointer a, gconstpointer b) -{ - gint one = *((const gint*)a); - gint two = *((const gint*)b); - return two-one; -} - -/* static void -my_list_print (gpointer a, gpointer b) -{ - gint three = *((gint*)a); - g_print("%d", three); -}; */ - -static gint -my_compare (gconstpointer a, - gconstpointer b) -{ - const char *cha = a; - const char *chb = b; - - return *cha - *chb; -} - -static gint -my_traverse (gpointer key, - gpointer value, - gpointer data) -{ - char *ch = key; - g_print ("%c ", *ch); - return FALSE; -} - -int -main (int argc, - char *argv[]) -{ - GList *list, *t; - GSList *slist, *st; - GHashTable *hash_table; - GMemChunk *mem_chunk; - GStringChunk *string_chunk; - GTimer *timer; - gint nums[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - gint morenums[10] = { 8, 9, 7, 0, 3, 2, 5, 1, 4, 6}; - gchar *string; - - gchar *mem[10000], *tmp_string = NULL, *tmp_string_2; - gint i, j; - GArray *garray; - GPtrArray *gparray; - GByteArray *gbarray; - GString *string1, *string2; - GTree *tree; - char chars[62]; - GRelation *relation; - GTuples *tuples; - gint data [1024]; - struct { - gchar *filename; - gchar *dirname; - } dirname_checks[] = { -#ifndef G_OS_WIN32 - { "/", "/" }, - { "////", "/" }, - { ".////", "." }, - { "../", ".." }, - { "..////", ".." }, - { "a/b", "a" }, - { "a/b/", "a/b" }, - { "c///", "c" }, -#else - { "\\", "\\" }, - { ".\\\\\\\\", "." }, - { "..\\", ".." }, - { "..\\\\\\\\", ".." }, - { "a\\b", "a" }, - { "a\\b\\", "a\\b" }, - { "c\\\\\\", "c" }, -#endif -#ifdef G_WITH_CYGWIN - { "//server/share///x", "//server/share" }, -#endif - { ".", "." }, - { "..", "." }, - { "", "." }, - }; - guint n_dirname_checks = G_N_ELEMENTS (dirname_checks); - - struct { - gchar *filename; - gchar *without_root; - } skip_root_checks[] = { -#ifndef G_OS_WIN32 - { "/", "" }, - { "//", "" }, - { "/foo", "foo" }, - { "//foo", "foo" }, - { "a/b", NULL }, -#else - { "\\", "" }, - { "\\foo", "foo" }, - { "\\\\server\\foo", "" }, - { "\\\\server\\foo\\bar", "bar" }, - { "a\\b", NULL }, -#endif -#ifdef G_WITH_CYGWIN - { "//server/share///x", "//x" }, -#endif - { ".", NULL }, - { "", NULL }, - }; - guint n_skip_root_checks = G_N_ELEMENTS (skip_root_checks); - - guint16 gu16t1 = 0x44afU, gu16t2 = 0xaf44U; - guint32 gu32t1 = 0x02a7f109U, gu32t2 = 0x09f1a702U; -#ifdef G_HAVE_GINT64 - guint64 gu64t1 = G_GINT64_CONSTANT(0x1d636b02300a7aa7U), - gu64t2 = G_GINT64_CONSTANT(0xa77a0a30026b631dU); -#endif - const char hello[] = "Hello, World"; - const int hellolen = sizeof (hello) - 1; - int fd; - char template[32]; - GError *error; - char *name_used; -#ifdef G_OS_WIN32 - gchar *glib_dll = g_strdup_printf ("glib-%d.%d.dll", - GLIB_MAJOR_VERSION, - GLIB_MINOR_VERSION); -#endif -#ifdef G_WITH_CYGWIN - gchar *glib_dll = g_strdup_printf ("cygglib-%d.%d.dll", - GLIB_MAJOR_VERSION, - GLIB_MINOR_VERSION); -#endif - - g_print ("TestGLib v%u.%u.%u (i:%u b:%u)\n", - glib_major_version, - glib_minor_version, - glib_micro_version, - glib_interface_age, - glib_binary_age); - - string = g_get_current_dir (); - g_print ("cwd: %s\n", string); - g_free (string); - g_print ("user: %s\n", g_get_user_name ()); - g_print ("real: %s\n", g_get_real_name ()); - g_print ("home: %s\n", g_get_home_dir ()); - g_print ("tmp-dir: %s\n", g_get_tmp_dir ()); - - /* type sizes */ - g_print ("checking size of gint8: %d", (int)sizeof (gint8)); - TEST (NULL, sizeof (gint8) == 1); - g_print ("\nchecking size of gint16: %d", (int)sizeof (gint16)); - TEST (NULL, sizeof (gint16) == 2); - g_print ("\nchecking size of gint32: %d", (int)sizeof (gint32)); - TEST (NULL, sizeof (gint32) == 4); - g_print ("\nchecking size of gsize: %d", (int)sizeof (gsize)); -#ifdef G_HAVE_GINT64 - g_print ("\nchecking size of gint64: %d", (int)sizeof (gint64)); - TEST (NULL, sizeof (gint64) == 8); -#endif /* G_HAVE_GINT64 */ - g_print ("\n"); - - g_print ("checking g_path_get_dirname()..."); - for (i = 0; i < n_dirname_checks; i++) - { - gchar *dirname; - - dirname = g_path_get_dirname (dirname_checks[i].filename); - if (strcmp (dirname, dirname_checks[i].dirname) != 0) - { - g_print ("\nfailed for \"%s\"==\"%s\" (returned: \"%s\")\n", - dirname_checks[i].filename, - dirname_checks[i].dirname, - dirname); - n_dirname_checks = 0; - } - g_free (dirname); - } - if (n_dirname_checks) - g_print ("ok\n"); - - g_print ("checking g_path_skip_root()..."); - for (i = 0; i < n_skip_root_checks; i++) - { - const gchar *skipped; - - skipped = g_path_skip_root (skip_root_checks[i].filename); - if ((skipped && !skip_root_checks[i].without_root) || - (!skipped && skip_root_checks[i].without_root) || - ((skipped && skip_root_checks[i].without_root) && - strcmp (skipped, skip_root_checks[i].without_root))) - { - g_print ("\nfailed for \"%s\"==\"%s\" (returned: \"%s\")\n", - skip_root_checks[i].filename, - (skip_root_checks[i].without_root ? - skip_root_checks[i].without_root : "<NULL>"), - (skipped ? skipped : "<NULL>")); - n_skip_root_checks = 0; - } - } - if (n_skip_root_checks) - g_print ("ok\n"); - - g_print ("checking doubly linked lists..."); - - list = NULL; - for (i = 0; i < 10; i++) - list = g_list_append (list, &nums[i]); - list = g_list_reverse (list); - - for (i = 0; i < 10; i++) - { - t = g_list_nth (list, i); - if (*((gint*) t->data) != (9 - i)) - g_error ("Regular insert failed"); - } - - for (i = 0; i < 10; i++) - if(g_list_position(list, g_list_nth (list, i)) != i) - g_error("g_list_position does not seem to be the inverse of g_list_nth\n"); - - g_list_free (list); - list = NULL; - - for (i = 0; i < 10; i++) - list = g_list_insert_sorted (list, &morenums[i], my_list_compare_one); - - /* - g_print("\n"); - g_list_foreach (list, my_list_print, NULL); - */ - - for (i = 0; i < 10; i++) - { - t = g_list_nth (list, i); - if (*((gint*) t->data) != i) - g_error ("Sorted insert failed"); - } - - g_list_free (list); - list = NULL; - - for (i = 0; i < 10; i++) - list = g_list_insert_sorted (list, &morenums[i], my_list_compare_two); - - /* - g_print("\n"); - g_list_foreach (list, my_list_print, NULL); - */ - - for (i = 0; i < 10; i++) - { - t = g_list_nth (list, i); - if (*((gint*) t->data) != (9 - i)) - g_error ("Sorted insert failed"); - } - - g_list_free (list); - list = NULL; - - for (i = 0; i < 10; i++) - list = g_list_prepend (list, &morenums[i]); - - list = g_list_sort (list, my_list_compare_two); - - /* - g_print("\n"); - g_list_foreach (list, my_list_print, NULL); - */ - - for (i = 0; i < 10; i++) - { - t = g_list_nth (list, i); - if (*((gint*) t->data) != (9 - i)) - g_error ("Merge sort failed"); - } - - g_list_free (list); - - g_print ("ok\n"); - - - g_print ("checking singly linked lists..."); - - slist = NULL; - for (i = 0; i < 10; i++) - slist = g_slist_append (slist, &nums[i]); - slist = g_slist_reverse (slist); - - for (i = 0; i < 10; i++) - { - st = g_slist_nth (slist, i); - if (*((gint*) st->data) != (9 - i)) - g_error ("failed"); - } - - g_slist_free (slist); - slist = NULL; - - for (i = 0; i < 10; i++) - slist = g_slist_insert_sorted (slist, &morenums[i], my_list_compare_one); - - /* - g_print("\n"); - g_slist_foreach (slist, my_list_print, NULL); - */ - - for (i = 0; i < 10; i++) - { - st = g_slist_nth (slist, i); - if (*((gint*) st->data) != i) - g_error ("Sorted insert failed"); - } - - g_slist_free(slist); - slist = NULL; - - for (i = 0; i < 10; i++) - slist = g_slist_insert_sorted (slist, &morenums[i], my_list_compare_two); - - /* - g_print("\n"); - g_slist_foreach (slist, my_list_print, NULL); - */ - - for (i = 0; i < 10; i++) - { - st = g_slist_nth (slist, i); - if (*((gint*) st->data) != (9 - i)) - g_error("Sorted insert failed"); - } - - g_slist_free(slist); - slist = NULL; - - for (i = 0; i < 10; i++) - slist = g_slist_prepend (slist, &morenums[i]); - - slist = g_slist_sort (slist, my_list_compare_two); - - /* - g_print("\n"); - g_slist_foreach (slist, my_list_print, NULL); - */ - - for (i = 0; i < 10; i++) - { - st = g_slist_nth (slist, i); - if (*((gint*) st->data) != (9 - i)) - g_error("Sorted insert failed"); - } - - g_slist_free(slist); - - g_print ("ok\n"); - - - g_print ("checking binary trees...\n"); - - tree = g_tree_new (my_compare); - i = 0; - for (j = 0; j < 10; j++, i++) - { - chars[i] = '0' + j; - g_tree_insert (tree, &chars[i], &chars[i]); - } - for (j = 0; j < 26; j++, i++) - { - chars[i] = 'A' + j; - g_tree_insert (tree, &chars[i], &chars[i]); - } - for (j = 0; j < 26; j++, i++) - { - chars[i] = 'a' + j; - g_tree_insert (tree, &chars[i], &chars[i]); - } - - g_print ("tree height: %d\n", g_tree_height (tree)); - g_print ("tree nnodes: %d\n", g_tree_nnodes (tree)); - - g_print ("tree: "); - g_tree_traverse (tree, my_traverse, G_IN_ORDER, NULL); - g_print ("\n"); - - for (i = 0; i < 10; i++) - g_tree_remove (tree, &chars[i]); - - g_print ("tree height: %d\n", g_tree_height (tree)); - g_print ("tree nnodes: %d\n", g_tree_nnodes (tree)); - - g_print ("tree: "); - g_tree_traverse (tree, my_traverse, G_IN_ORDER, NULL); - g_print ("\n"); - - g_print ("ok\n"); - - - /* check n-way trees */ - g_node_test (); - - g_print ("checking mem chunks..."); - - mem_chunk = g_mem_chunk_new ("test mem chunk", 50, 100, G_ALLOC_AND_FREE); - - for (i = 0; i < 10000; i++) - { - mem[i] = g_chunk_new (gchar, mem_chunk); - - for (j = 0; j < 50; j++) - mem[i][j] = i * j; - } - - for (i = 0; i < 10000; i++) - { - g_mem_chunk_free (mem_chunk, mem[i]); - } - - g_print ("ok\n"); - - - g_print ("checking hash tables..."); - - hash_table = g_hash_table_new (my_hash, my_hash_equal); - for (i = 0; i < 10000; i++) - { - array[i] = i; - g_hash_table_insert (hash_table, &array[i], &array[i]); - } - g_hash_table_foreach (hash_table, my_hash_callback, NULL); - - for (i = 0; i < 10000; i++) - if (array[i] == 0) - g_print ("%d\n", i); - - for (i = 0; i < 10000; i++) - g_hash_table_remove (hash_table, &array[i]); - - for (i = 0; i < 10000; i++) - { - array[i] = i; - g_hash_table_insert (hash_table, &array[i], &array[i]); - } - - if (g_hash_table_foreach_remove (hash_table, my_hash_callback_remove, NULL) != 5000 || - g_hash_table_size (hash_table) != 5000) - g_print ("bad!\n"); - - g_hash_table_foreach (hash_table, my_hash_callback_remove_test, NULL); - - - g_hash_table_destroy (hash_table); - - g_print ("ok\n"); - - - g_print ("checking string chunks..."); - - string_chunk = g_string_chunk_new (1024); - - for (i = 0; i < 100000; i ++) - { - tmp_string = g_string_chunk_insert (string_chunk, "hi pete"); - - if (strcmp ("hi pete", tmp_string) != 0) - g_error ("string chunks are broken.\n"); - } - - tmp_string_2 = g_string_chunk_insert_const (string_chunk, tmp_string); - - g_assert (tmp_string_2 != tmp_string && - strcmp(tmp_string_2, tmp_string) == 0); - - tmp_string = g_string_chunk_insert_const (string_chunk, tmp_string); - - g_assert (tmp_string_2 == tmp_string); - - g_string_chunk_free (string_chunk); - - g_print ("ok\n"); - - - g_print ("checking arrays..."); - - garray = g_array_new (FALSE, FALSE, sizeof (gint)); - for (i = 0; i < 10000; i++) - g_array_append_val (garray, i); - - for (i = 0; i < 10000; i++) - if (g_array_index (garray, gint, i) != i) - g_print ("uh oh: %d ( %d )\n", g_array_index (garray, gint, i), i); - - g_array_free (garray, TRUE); - - garray = g_array_new (FALSE, FALSE, sizeof (gint)); - for (i = 0; i < 100; i++) - g_array_prepend_val (garray, i); - - for (i = 0; i < 100; i++) - if (g_array_index (garray, gint, i) != (100 - i - 1)) - g_print ("uh oh: %d ( %d )\n", g_array_index (garray, gint, i), 100 - i - 1); - - g_array_free (garray, TRUE); - - g_print ("ok\n"); - - - g_print ("checking strings..."); - - string1 = g_string_new ("hi pete!"); - string2 = g_string_new (""); - - g_assert (strcmp ("hi pete!", string1->str) == 0); - - for (i = 0; i < 10000; i++) - g_string_append_c (string1, 'a'+(i%26)); - -#ifndef G_OS_WIN32 - /* MSVC, mingw32 and LCC use the same run-time C library, which doesn't like - the %10000.10000f format... */ - g_string_sprintf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%10000.10000f", - "this pete guy sure is a wuss, like he's the number ", - 1, - " wuss. everyone agrees.\n", - string1->str, - 10, 666, 15, 15, 666.666666666, 666.666666666); -#else - g_string_sprintf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%100.100f", - "this pete guy sure is a wuss, like he's the number ", - 1, - " wuss. everyone agrees.\n", - string1->str, - 10, 666, 15, 15, 666.666666666, 666.666666666); -#endif - - g_print ("string2 length = %d...\n", string2->len); - string2->str[70] = '\0'; - g_print ("first 70 chars:\n%s\n", string2->str); - string2->str[141] = '\0'; - g_print ("next 70 chars:\n%s\n", string2->str+71); - string2->str[212] = '\0'; - g_print ("and next 70:\n%s\n", string2->str+142); - g_print ("last 70 chars:\n%s\n", string2->str+string2->len - 70); - - g_string_free (string1, TRUE); - g_string_free (string2, TRUE); - - /* append */ - string1 = g_string_new ("firsthalf"); - g_string_append (string1, "lasthalf"); - g_assert (strcmp (string1->str, "firsthalflasthalf") == 0); - g_string_free (string1, TRUE); - - /* append_len */ - - string1 = g_string_new ("firsthalf"); - g_string_append_len (string1, "lasthalfjunkjunk", strlen ("lasthalf")); - g_assert (strcmp (string1->str, "firsthalflasthalf") == 0); - g_string_free (string1, TRUE); - - /* prepend */ - string1 = g_string_new ("lasthalf"); - g_string_prepend (string1, "firsthalf"); - g_assert (strcmp (string1->str, "firsthalflasthalf") == 0); - g_string_free (string1, TRUE); - - /* prepend_len */ - string1 = g_string_new ("lasthalf"); - g_string_prepend_len (string1, "firsthalfjunkjunk", strlen ("firsthalf")); - g_assert (strcmp (string1->str, "firsthalflasthalf") == 0); - g_string_free (string1, TRUE); - - /* insert */ - string1 = g_string_new ("firstlast"); - g_string_insert (string1, 5, "middle"); - g_assert (strcmp (string1->str, "firstmiddlelast") == 0); - g_string_free (string1, TRUE); - - /* insert with pos == end of the string */ - string1 = g_string_new ("firstmiddle"); - g_string_insert (string1, strlen ("firstmiddle"), "last"); - g_assert (strcmp (string1->str, "firstmiddlelast") == 0); - g_string_free (string1, TRUE); - - /* insert_len */ - - string1 = g_string_new ("firstlast"); - g_string_insert_len (string1, 5, "middlejunkjunk", strlen ("middle")); - g_assert (strcmp (string1->str, "firstmiddlelast") == 0); - g_string_free (string1, TRUE); - - /* insert_len with magic -1 pos for append */ - string1 = g_string_new ("first"); - g_string_insert_len (string1, -1, "lastjunkjunk", strlen ("last")); - g_assert (strcmp (string1->str, "firstlast") == 0); - g_string_free (string1, TRUE); - - /* insert_len with magic -1 len for strlen-the-string */ - string1 = g_string_new ("first"); - g_string_insert_len (string1, 5, "last", -1); - g_assert (strcmp (string1->str, "firstlast") == 0); - g_string_free (string1, TRUE); - - g_print ("ok\n"); - - /* g_string_equal */ - string1 = g_string_new ("test"); - string2 = g_string_new ("te"); - g_assert (! g_string_equal(string1, string2)); - g_string_append (string2, "st"); - g_assert (g_string_equal(string1, string2)); - g_string_free (string1, TRUE); - g_string_free (string2, TRUE); - - /* Check handling of embedded ASCII 0 (NUL) characters in GString. */ - string1 = g_string_new ("fiddle"); - string2 = g_string_new ("fiddle"); - g_assert (g_string_equal(string1, string2)); - g_string_append_c(string1, '\0'); - g_assert (! g_string_equal(string1, string2)); - g_string_append_c(string2, '\0'); - g_assert (g_string_equal(string1, string2)); - g_string_append_c(string1, 'x'); - g_string_append_c(string2, 'y'); - g_assert (! g_string_equal(string1, string2)); - g_assert (string1->len == 8); - g_string_append(string1, "yzzy"); - g_assert (string1->len == 12); - g_assert ( memcmp(string1->str, "fiddle\0xyzzy", 13) == 0); - g_string_insert(string1, 1, "QED"); - g_assert ( memcmp(string1->str, "fQEDiddle\0xyzzy", 16) == 0); - g_string_free (string1, TRUE); - g_string_free (string2, TRUE); - - g_print ("test positional printf formats (not supported): "); - string = g_strdup_printf ("%.*s%s", 5, "a", "b"); - tmp_string = g_strdup_printf ("%2$*1$s", 5, "c"); - g_print ("%s%s\n", string, tmp_string); - g_free (tmp_string); - g_free (string); - - g_print ("checking timers...\n"); - - timer = g_timer_new (); - g_print (" spinning for 3 seconds...\n"); - - g_timer_start (timer); - while (g_timer_elapsed (timer, NULL) < 3) - ; - - g_timer_stop (timer); - g_timer_destroy (timer); - - g_print ("ok\n"); - - g_print ("checking g_strcasecmp..."); - g_assert (g_strcasecmp ("FroboZZ", "frobozz") == 0); - g_assert (g_strcasecmp ("frobozz", "frobozz") == 0); - g_assert (g_strcasecmp ("frobozz", "FROBOZZ") == 0); - g_assert (g_strcasecmp ("FROBOZZ", "froboz") != 0); - g_assert (g_strcasecmp ("", "") == 0); - g_assert (g_strcasecmp ("!#%&/()", "!#%&/()") == 0); - g_assert (g_strcasecmp ("a", "b") < 0); - g_assert (g_strcasecmp ("a", "B") < 0); - g_assert (g_strcasecmp ("A", "b") < 0); - g_assert (g_strcasecmp ("A", "B") < 0); - g_assert (g_strcasecmp ("b", "a") > 0); - g_assert (g_strcasecmp ("b", "A") > 0); - g_assert (g_strcasecmp ("B", "a") > 0); - g_assert (g_strcasecmp ("B", "A") > 0); - - g_print ("ok\n"); - - g_print ("checking g_strdup..."); - g_assert(g_strdup(NULL) == NULL); - string = g_strdup(GLIB_TEST_STRING); - g_assert(string != NULL); - g_assert(strcmp(string, GLIB_TEST_STRING) == 0); - g_free(string); - - g_print ("ok\n"); - - g_print ("checking g_strconcat..."); - string = g_strconcat(GLIB_TEST_STRING, NULL); - g_assert(string != NULL); - g_assert(strcmp(string, GLIB_TEST_STRING) == 0); - g_free(string); - string = g_strconcat(GLIB_TEST_STRING, GLIB_TEST_STRING, - GLIB_TEST_STRING, NULL); - g_assert(string != NULL); - g_assert(strcmp(string, GLIB_TEST_STRING GLIB_TEST_STRING - GLIB_TEST_STRING) == 0); - g_free(string); - g_print ("ok\n"); - - - g_print("checking g_strlcpy/g_strlcat..."); - /* The following is a torture test for strlcpy/strlcat, with lots of - * checking; normal users wouldn't use them this way! - */ - string = g_malloc (6); - *(string + 5) = 'Z'; /* guard value, shouldn't change during test */ - *string = 'q'; - g_assert (g_strlcpy(string, "" , 5) == 0); - g_assert ( *string == '\0' ); - *string = 'q'; - g_assert (g_strlcpy(string, "abc" , 5) == 3); - g_assert ( *(string + 3) == '\0' ); - g_assert (g_str_equal(string, "abc")); - g_assert (g_strlcpy(string, "abcd" , 5) == 4); - g_assert ( *(string + 4) == '\0' ); - g_assert ( *(string + 5) == 'Z' ); - g_assert (g_str_equal(string, "abcd")); - g_assert (g_strlcpy(string, "abcde" , 5) == 5); - g_assert ( *(string + 4) == '\0' ); - g_assert ( *(string + 5) == 'Z' ); - g_assert (g_str_equal(string, "abcd")); - g_assert (g_strlcpy(string, "abcdef" , 5) == 6); - g_assert ( *(string + 4) == '\0' ); - g_assert ( *(string + 5) == 'Z' ); - g_assert (g_str_equal(string, "abcd")); - *string = 'Y'; - *(string + 1)= '\0'; - g_assert (g_strlcpy(string, "Hello" , 0) == 5); - g_assert (*string == 'Y'); - *string = '\0'; - g_assert (g_strlcat(string, "123" , 5) == 3); - g_assert ( *(string + 3) == '\0' ); - g_assert (g_str_equal(string, "123")); - g_assert (g_strlcat(string, "" , 5) == 3); - g_assert ( *(string + 3) == '\0' ); - g_assert (g_str_equal(string, "123")); - g_assert (g_strlcat(string, "4", 5) == 4); - g_assert (g_str_equal(string, "1234")); - g_assert (g_strlcat(string, "5", 5) == 5); - g_assert ( *(string + 4) == '\0' ); - g_assert (g_str_equal(string, "1234")); - g_assert ( *(string + 5) == 'Z' ); - *string = 'Y'; - *(string + 1)= '\0'; - g_assert (g_strlcat(string, "123" , 0) == 3); - g_assert (*string == 'Y'); - - /* A few more tests, demonstrating more "normal" use */ - g_assert (g_strlcpy(string, "hi", 5) == 2); - g_assert (g_str_equal(string, "hi")); - g_assert (g_strlcat(string, "t", 5) == 3); - g_assert (g_str_equal(string, "hit")); - g_free(string); - - g_print ("ok\n"); - - - g_print ("checking g_strdup_printf..."); - string = g_strdup_printf ("%05d %-5s", 21, "test"); - g_assert (string != NULL); - g_assert (strcmp(string, "00021 test ") == 0); - g_free (string); - - g_print ("ok\n"); - - /* g_debug (argv[0]); */ - - /* Relation tests */ - - g_print ("checking relations..."); - - relation = g_relation_new (2); - - g_relation_index (relation, 0, g_int_hash, g_int_equal); - g_relation_index (relation, 1, g_int_hash, g_int_equal); - - for (i = 0; i < 1024; i += 1) - data[i] = i; - - for (i = 1; i < 1023; i += 1) - { - g_relation_insert (relation, data + i, data + i + 1); - g_relation_insert (relation, data + i, data + i - 1); - } - - for (i = 2; i < 1022; i += 1) - { - g_assert (! g_relation_exists (relation, data + i, data + i)); - g_assert (! g_relation_exists (relation, data + i, data + i + 2)); - g_assert (! g_relation_exists (relation, data + i, data + i - 2)); - } - - for (i = 1; i < 1023; i += 1) - { - g_assert (g_relation_exists (relation, data + i, data + i + 1)); - g_assert (g_relation_exists (relation, data + i, data + i - 1)); - } - - for (i = 2; i < 1022; i += 1) - { - g_assert (g_relation_count (relation, data + i, 0) == 2); - g_assert (g_relation_count (relation, data + i, 1) == 2); - } - - g_assert (g_relation_count (relation, data, 0) == 0); - - g_assert (g_relation_count (relation, data + 42, 0) == 2); - g_assert (g_relation_count (relation, data + 43, 1) == 2); - g_assert (g_relation_count (relation, data + 41, 1) == 2); - g_relation_delete (relation, data + 42, 0); - g_assert (g_relation_count (relation, data + 42, 0) == 0); - g_assert (g_relation_count (relation, data + 43, 1) == 1); - g_assert (g_relation_count (relation, data + 41, 1) == 1); - - tuples = g_relation_select (relation, data + 200, 0); - - g_assert (tuples->len == 2); - -#if 0 - for (i = 0; i < tuples->len; i += 1) - { - printf ("%d %d\n", - *(gint*) g_tuples_index (tuples, i, 0), - *(gint*) g_tuples_index (tuples, i, 1)); - } -#endif - - g_assert (g_relation_exists (relation, data + 300, data + 301)); - g_relation_delete (relation, data + 300, 0); - g_assert (!g_relation_exists (relation, data + 300, data + 301)); - - g_tuples_destroy (tuples); - - g_relation_destroy (relation); - - relation = NULL; - - g_print ("ok\n"); - - g_print ("checking pointer arrays..."); - - gparray = g_ptr_array_new (); - for (i = 0; i < 10000; i++) - g_ptr_array_add (gparray, GINT_TO_POINTER (i)); - - for (i = 0; i < 10000; i++) - if (g_ptr_array_index (gparray, i) != GINT_TO_POINTER (i)) - g_print ("array fails: %p ( %p )\n", g_ptr_array_index (gparray, i), GINT_TO_POINTER (i)); - - g_ptr_array_free (gparray, TRUE); - - g_print ("ok\n"); - - - g_print ("checking byte arrays..."); - - gbarray = g_byte_array_new (); - for (i = 0; i < 10000; i++) - g_byte_array_append (gbarray, (guint8*) "abcd", 4); - - for (i = 0; i < 10000; i++) - { - g_assert (gbarray->data[4*i] == 'a'); - g_assert (gbarray->data[4*i+1] == 'b'); - g_assert (gbarray->data[4*i+2] == 'c'); - g_assert (gbarray->data[4*i+3] == 'd'); - } - - g_byte_array_free (gbarray, TRUE); - g_print ("ok\n"); - - g_printerr ("g_log tests:"); - g_warning ("harmless warning with parameters: %d %s %#x", 42, "Boo", 12345); - g_message ("the next warning is a test:"); - string = NULL; - g_print (string); - - g_print ("checking endian macros (host is "); -#if G_BYTE_ORDER == G_BIG_ENDIAN - g_print ("big endian)..."); -#else - g_print ("little endian)..."); -#endif - g_assert (GUINT16_SWAP_LE_BE (gu16t1) == gu16t2); - g_assert (GUINT32_SWAP_LE_BE (gu32t1) == gu32t2); -#ifdef G_HAVE_GINT64 - g_assert (GUINT64_SWAP_LE_BE (gu64t1) == gu64t2); -#endif - - g_print ("ok\n"); - -#ifdef G_PLATFORM_WIN32 - g_print ("current locale: %s\n", g_win32_getlocale ()); - - g_print ("GLib installation directory, from Registry entry for %s if available: %s\n", - GETTEXT_PACKAGE, - g_win32_get_package_installation_directory (GETTEXT_PACKAGE, NULL)); - g_print ("Ditto, or from GLib DLL name: %s\n", - g_win32_get_package_installation_directory (GETTEXT_PACKAGE, glib_dll)); - g_print ("Ditto, only from GLib DLL name: %s\n", - g_win32_get_package_installation_directory (NULL, glib_dll)); - g_print ("locale subdirectory of GLib installation directory: %s\n", - g_win32_get_package_installation_subdirectory (NULL, glib_dll, "locale")); - g_print ("GTK+ 2.0 installation directory, if available: %s\n", - g_win32_get_package_installation_directory ("gtk20", NULL)); - - g_print ("found more.com as %s\n", g_find_program_in_path ("more.com")); - g_print ("found regedit as %s\n", g_find_program_in_path ("regedit")); - -#endif - - g_print ("checking file functions...\n"); - - strcpy (template, "foobar"); - fd = g_mkstemp (template); - if (fd != -1) - g_print ("g_mkstemp works even if template doesn't end in XXXXXX\n"); - close (fd); - strcpy (template, "fooXXXXXX"); - fd = g_mkstemp (template); - if (fd == -1) - g_print ("g_mkstemp didn't work for template %s\n", template); - i = write (fd, hello, hellolen); - if (i == -1) - g_print ("write() failed: %s\n", g_strerror (errno)); - else if (i != hellolen) - g_print ("write() should have written %d bytes, wrote %d\n", hellolen, i); - - lseek (fd, 0, 0); - i = read (fd, chars, sizeof (chars)); - if (i == -1) - g_print ("read() failed: %s\n", g_strerror (errno)); - else if (i != hellolen) - g_print ("read() should have read %d bytes, got %d\n", hellolen, i); - - chars[i] = 0; - if (strcmp (chars, hello) != 0) - g_print ("wrote '%s', but got '%s'\n", hello, chars); - - close (fd); - remove (template); - - error = NULL; - strcpy (template, "zap" G_DIR_SEPARATOR_S "barXXXXXX"); - fd = g_file_open_tmp (template, &name_used, &error); - if (fd != -1) - g_print ("g_file_open_tmp works even if template contains '%s'\n", - G_DIR_SEPARATOR_S); - else - g_print ("g_file_open_tmp correctly returns error: %s\n", - error->message); - close (fd); - g_clear_error (&error); - - strcpy (template, "zapXXXXXX"); - fd = g_file_open_tmp (template, &name_used, &error); - if (fd == -1) - g_print ("g_file_open_tmp didn't work for template '%s': %s\n", - template, error->message); - else - g_print ("g_file_open_tmp for template '%s' used name '%s'\n", - template, name_used); - close (fd); - g_clear_error (&error); - remove (name_used); - - fd = g_file_open_tmp (NULL, &name_used, &error); - if (fd == -1) - g_print ("g_file_open_tmp didn't work for a NULL template: %s\n", - error->message); - else - g_print ("g_file_open_tmp for NULL template used name '%s'\n", - name_used); - close (fd); - g_clear_error (&error); - remove (name_used); - - return 0; -} - diff --git a/tests/.cvsignore b/tests/.cvsignore index 0b3055bfd..7b0e531ad 100644 --- a/tests/.cvsignore +++ b/tests/.cvsignore @@ -39,3 +39,8 @@ tree-test type-test unicode-encoding gio-test +testgdate +testgdateparser +testglib +timeloop +timeloop-basic diff --git a/tests/Makefile.am b/tests/Makefile.am index 2006e5c49..49e277fc0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,8 +1,8 @@ -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule @GLIB_DEBUG_FLAGS@ +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_srcdir)/gmodule @GLIB_DEBUG_FLAGS@ EFENCE= -libglib = $(top_builddir)/libglib-1.3.la +libglib = $(top_builddir)/glib/libglib-1.3.la libgthread = $(top_builddir)/gthread/libgthread-1.3.la libgmodule = $(top_builddir)/gmodule/libgmodule-1.3.la libgobject = $(top_builddir)/gobject/libgobject-1.3.la @@ -31,6 +31,17 @@ else CXX_TEST = endif +if ENABLE_TIMELOOP +timeloop = timeloop +endif +noinst_PROGRAMS = testglib testgdate testgdateparser $(timeloop) +testglib_LDADD = $(libglib) +testgdate_LDADD = $(libglib) +testgdateparser_LDADD = $(libglib) +if ENABLE_TIMELOOP +timeloop_LDADD = $(libglib) +endif + test_programs = \ array-test \ $(CXX_TEST) \ diff --git a/timeloop-basic.c b/timeloop-basic.c deleted file mode 100644 index 6e8051f76..000000000 --- a/timeloop-basic.c +++ /dev/null @@ -1,232 +0,0 @@ -#include <errno.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <sys/resource.h> -#include <sys/time.h> -#include <sys/poll.h> - -#define TRUE 1 -#define FALSE 0 - -static int n_children = 3; -static int n_active_children; -static int n_iters = 10000; - -static int write_fds[1024]; -static struct pollfd poll_fds[1024]; - -void -my_pipe (int *fds) -{ - if (pipe(fds) < 0) - { - fprintf (stderr, "Cannot create pipe %s\n", strerror (errno)); - exit (1); - } -} - -int -read_all (int fd, char *buf, int len) -{ - size_t bytes_read = 0; - ssize_t count; - - while (bytes_read < len) - { - count = read (fd, buf + bytes_read, len - bytes_read); - if (count < 0) - { - if (errno != EAGAIN) - return FALSE; - } - else if (count == 0) - return FALSE; - - bytes_read += count; - } - - return TRUE; -} - -int -write_all (int fd, char *buf, int len) -{ - size_t bytes_written = 0; - ssize_t count; - - while (bytes_written < len) - { - count = write (fd, buf + bytes_written, len - bytes_written); - if (count < 0) - { - if (errno != EAGAIN) - return FALSE; - } - - bytes_written += count; - } - - return TRUE; -} - -void -run_child (int in_fd, int out_fd) -{ - int i; - int val = 1; - - for (i = 0; i < n_iters; i++) - { - write_all (out_fd, (char *)&val, sizeof (val)); - read_all (in_fd, (char *)&val, sizeof (val)); - } - - val = 0; - write_all (out_fd, (char *)&val, sizeof (val)); - - exit (0); -} - -int -input_callback (int source, int dest) -{ - int val; - - if (!read_all (source, (char *)&val, sizeof(val))) - { - fprintf (stderr,"Unexpected EOF\n"); - exit (1); - } - - if (val) - { - write_all (dest, (char *)&val, sizeof(val)); - return TRUE; - } - else - { - close (source); - close (dest); - - n_active_children--; - return FALSE; - } -} - -void -create_child (int pos) -{ - int pid; - int in_fds[2]; - int out_fds[2]; - - my_pipe (in_fds); - my_pipe (out_fds); - - pid = fork (); - - if (pid > 0) /* Parent */ - { - close (in_fds[0]); - close (out_fds[1]); - - write_fds[pos] = in_fds[1]; - poll_fds[pos].fd = out_fds[0]; - poll_fds[pos].events = POLLIN; - } - else if (pid == 0) /* Child */ - { - close (in_fds[1]); - close (out_fds[0]); - - setsid (); - - run_child (in_fds[0], out_fds[1]); - } - else /* Error */ - { - fprintf (stderr,"Cannot fork: %s\n", strerror (errno)); - exit (1); - } -} - -static double -difftimeval (struct timeval *old, struct timeval *new) -{ - return - (new->tv_sec - old->tv_sec) * 1000. + (new->tv_usec - old->tv_usec) / 1000; -} - -int -main (int argc, char **argv) -{ - int i, j; - struct rusage old_usage; - struct rusage new_usage; - - if (argc > 1) - n_children = atoi(argv[1]); - - if (argc > 2) - n_iters = atoi(argv[2]); - - printf ("Children: %d Iters: %d\n", n_children, n_iters); - - n_active_children = n_children; - for (i = 0; i < n_children; i++) - create_child (i); - - getrusage (RUSAGE_SELF, &old_usage); - - while (n_active_children > 0) - { - int old_n_active_children = n_active_children; - - poll (poll_fds, n_active_children, -1); - - for (i=0; i<n_active_children; i++) - { - if (poll_fds[i].events & (POLLIN | POLLHUP)) - { - if (!input_callback (poll_fds[i].fd, write_fds[i])) - write_fds[i] = -1; - } - } - - if (old_n_active_children > n_active_children) - { - j = 0; - for (i=0; i<old_n_active_children; i++) - { - if (write_fds[i] != -1) - { - if (j < i) - { - poll_fds[j] = poll_fds[i]; - write_fds[j] = write_fds[i]; - } - j++; - } - } - } - } - - getrusage (RUSAGE_SELF, &new_usage); - - printf ("Elapsed user: %g\n", - difftimeval (&old_usage.ru_utime, &new_usage.ru_utime)); - printf ("Elapsed system: %g\n", - difftimeval (&old_usage.ru_stime, &new_usage.ru_stime)); - printf ("Elapsed total: %g\n", - difftimeval (&old_usage.ru_utime, &new_usage.ru_utime) + - difftimeval (&old_usage.ru_stime, &new_usage.ru_stime)); - printf ("total / iteration: %g\n", - (difftimeval (&old_usage.ru_utime, &new_usage.ru_utime) + - difftimeval (&old_usage.ru_stime, &new_usage.ru_stime)) / - (n_iters * n_children)); - - return 0; -} - diff --git a/timeloop.c b/timeloop.c deleted file mode 100644 index 5517d6cfd..000000000 --- a/timeloop.c +++ /dev/null @@ -1,213 +0,0 @@ -#include <errno.h> -#include <stdlib.h> -#include <unistd.h> -#include <stdio.h> -#include <sys/time.h> -#include <sys/resource.h> - -#include <glib.h> - -static int n_children = 3; -static int n_active_children; -static int n_iters = 10000; -static GMainLoop *loop; - -static void -io_pipe (GIOChannel **channels) -{ - int fds[2]; - - if (pipe(fds) < 0) - { - fprintf (stderr, "Cannot create pipe %s\n", g_strerror (errno)); - exit (1); - } - - channels[0] = g_io_channel_unix_new (fds[0]); - channels[1] = g_io_channel_unix_new (fds[1]); -} - -static gboolean -read_all (GIOChannel *channel, char *buf, int len) -{ - gsize bytes_read = 0; - gsize count; - GIOError err; - - while (bytes_read < len) - { - err = g_io_channel_read (channel, buf + bytes_read, len - bytes_read, &count); - if (err) - { - if (err != G_IO_ERROR_AGAIN) - return FALSE; - } - else if (count == 0) - return FALSE; - - bytes_read += count; - } - - return TRUE; -} - -static gboolean -write_all (GIOChannel *channel, char *buf, int len) -{ - gsize bytes_written = 0; - gsize count; - GIOError err; - - while (bytes_written < len) - { - err = g_io_channel_write (channel, buf + bytes_written, len - bytes_written, &count); - if (err && err != G_IO_ERROR_AGAIN) - return FALSE; - - bytes_written += count; - } - - return TRUE; -} - -static void -run_child (GIOChannel *in_channel, GIOChannel *out_channel) -{ - int i; - int val = 1; - GTimer *timer = g_timer_new(); - - for (i = 0; i < n_iters; i++) - { - write_all (out_channel, (char *)&val, sizeof (val)); - read_all (in_channel, (char *)&val, sizeof (val)); - } - - val = 0; - write_all (out_channel, (char *)&val, sizeof (val)); - - val = g_timer_elapsed (timer, NULL) * 1000; - - write_all (out_channel, (char *)&val, sizeof (val)); - g_timer_destroy (timer); - - exit (0); -} - -static gboolean -input_callback (GIOChannel *source, - GIOCondition condition, - gpointer data) -{ - int val; - GIOChannel *dest = (GIOChannel *)data; - - if (!read_all (source, (char *)&val, sizeof(val))) - { - fprintf (stderr, "Unexpected EOF\n"); - exit (1); - } - - if (val) - { - write_all (dest, (char *)&val, sizeof(val)); - - return TRUE; - } - else - { - g_io_channel_close (source); - g_io_channel_close (dest); - - g_io_channel_unref (source); - g_io_channel_unref (dest); - - n_active_children--; - if (n_active_children == 0) - g_main_loop_quit (loop); - - return FALSE; - } -} - -static void -create_child () -{ - int pid; - GIOChannel *in_channels[2]; - GIOChannel *out_channels[2]; - - io_pipe (in_channels); - io_pipe (out_channels); - - pid = fork (); - - if (pid > 0) /* Parent */ - { - g_io_channel_close (in_channels[0]); - g_io_channel_close (out_channels[1]); - - g_io_add_watch (out_channels[0], G_IO_IN | G_IO_HUP, - input_callback, in_channels[1]); - } - else if (pid == 0) /* Child */ - { - g_io_channel_close (in_channels[1]); - g_io_channel_close (out_channels[0]); - - setsid (); - - run_child (in_channels[0], out_channels[1]); - } - else /* Error */ - { - fprintf (stderr, "Cannot fork: %s\n", g_strerror (errno)); - exit (1); - } -} - -static double -difftimeval (struct timeval *old, struct timeval *new) -{ - return - (new->tv_sec - old->tv_sec) * 1000. + (new->tv_usec - old->tv_usec) / 1000; -} - -int -main (int argc, char **argv) -{ - int i; - struct rusage old_usage; - struct rusage new_usage; - - if (argc > 1) - n_children = atoi(argv[1]); - - if (argc > 2) - n_iters = atoi(argv[2]); - - printf ("Children: %d Iters: %d\n", n_children, n_iters); - - n_active_children = n_children; - for (i = 0; i < n_children; i++) - create_child (); - - getrusage (RUSAGE_SELF, &old_usage); - loop = g_main_loop_new (NULL, FALSE); - g_main_loop_run (loop); - getrusage (RUSAGE_SELF, &new_usage); - - printf ("Elapsed user: %g\n", - difftimeval (&old_usage.ru_utime, &new_usage.ru_utime)); - printf ("Elapsed system: %g\n", - difftimeval (&old_usage.ru_stime, &new_usage.ru_stime)); - printf ("Elapsed total: %g\n", - difftimeval (&old_usage.ru_utime, &new_usage.ru_utime) + - difftimeval (&old_usage.ru_stime, &new_usage.ru_stime)); - printf ("total / iteration: %g\n", - (difftimeval (&old_usage.ru_utime, &new_usage.ru_utime) + - difftimeval (&old_usage.ru_stime, &new_usage.ru_stime)) / - (n_iters * n_children)); - - return 0; -} |